Don't ref the relation if it is not added.
authorLi Yuan <li.yuan@sun.com>
Mon, 10 Nov 2008 06:28:21 +0000 (06:28 +0000)
committerLi Yuan <liyuan@src.gnome.org>
Mon, 10 Nov 2008 06:28:21 +0000 (06:28 +0000)
2008-11-10  Li Yuan  <li.yuan@sun.com>

        * atk/atkrelationset.c: (atk_relation_set_add):
        Don't ref the relation if it is not added.

svn path=/trunk/; revision=1296

ChangeLog
atk/atkrelationset.c

index ed37dff..871d4c3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-10  Li Yuan  <li.yuan@sun.com>
+
+       * atk/atkrelationset.c: (atk_relation_set_add):
+       Don't ref the relation if it is not added.
+
 2008-11-07  Li Yuan  <li.yuan@sun.com>
 
        * atk/atkrelationset.c: (atk_relation_set_add):
index 3b975b7..2264595 100755 (executable)
@@ -164,8 +164,8 @@ atk_relation_set_add (AtkRelationSet *set,
   if (!atk_relation_set_contains (set, relationship))
   {
     g_ptr_array_add (set->relations, relation);
+    g_object_ref (relation);
   }
-  g_object_ref (relation);
 }
 
 /**