atk/atkobject.c Create an object relation set when the object is created.
authorPadraig O'Briain <padraigo@src.gnome.org>
Tue, 31 Jul 2001 09:19:49 +0000 (09:19 +0000)
committerPadraig O'Briain <padraigo@src.gnome.org>
Tue, 31 Jul 2001 09:19:49 +0000 (09:19 +0000)
* atk/atkobject.c
Create an object relation set when the object is created.

ChangeLog
atk/atkobject.c

index 0da3032..7c5b4ad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
+2001-07-31  Padraig O'Briain  <padraig.obriain@sun.com>
+
+       * atk/atkobject.c
+       Create an object relation set when the object is created.
+
 2001-07-30  Brian Cameron <brian.cameron@sun.com>
+
        * atk/atkutil.[ch]
        Changed first argument of atk_add_global_event_listener
        so the callback function is of type GSignalEmissionHook
index 961285e..cf856f1 100755 (executable)
@@ -366,7 +366,7 @@ atk_object_init  (AtkObject        *accessible,
   accessible->name = NULL;
   accessible->description = NULL;
   accessible->accessible_parent = NULL;
-  accessible->relation_set = NULL;
+  accessible->relation_set = atk_relation_set_new();
   accessible->role = ATK_ROLE_UNKNOWN;
 }
 
@@ -780,8 +780,8 @@ atk_implementor_ref_accessible (AtkImplementor *object)
 static AtkRelationSet*
 atk_object_real_ref_relation_set (AtkObject *accessible)
 {
-  if (accessible->relation_set)
-    g_object_ref (accessible->relation_set); 
+  g_return_val_if_fail (accessible->relation_set, NULL);
+  g_object_ref (accessible->relation_set); 
 
   return accessible->relation_set;
 }