diff options
Diffstat (limited to 'a11y/ea-factory.h')
-rw-r--r-- | a11y/ea-factory.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/a11y/ea-factory.h b/a11y/ea-factory.h index 06ae612d6f..34b7f4ceff 100644 --- a/a11y/ea-factory.h +++ b/a11y/ea-factory.h @@ -106,8 +106,12 @@ type_as_function ## _factory_get_type (void) \ EA_FACTORY_PARTB(type, type_as_function, opt_create_accessible) #define EA_SET_FACTORY(obj_type, type_as_function) \ - atk_registry_set_factory_type (atk_get_default_registry (), \ - obj_type, \ - type_as_function ## _factory_get_type ()) +{ \ + if (atk_get_root ()) { \ + atk_registry_set_factory_type (atk_get_default_registry (), \ + obj_type, \ + type_as_function ## _factory_get_type ());\ + } \ +} #endif /* _EA_FACTORY_H__ */ |