GNOME Bugzilla – Bug 478583
atk_relation_set_add always adds relation to the set
Last modified: 2008-11-07 12:28:35 UTC
atk_relation_set_add always adds relation to the set, no matter if it is already present in the set or not. The documentaion requires that the relation should not be added if it is already present in the set. The detailed bug description can be found at: http://linuxtesting.org/results/report?num=S0573
Created attachment 122172 [details] [review] patch
Only thing: g_object_ref(relation) should be performed only when relation was really added to the relationset. Because this relation will not be unref when AtkRealtionSet is destroyed.
> Because this relation will not be unref when AtkRealtionSet is destroyed. Mean: Because relation, which is not added to the array, will not be unref when AtkRealtionSet is destroyed.
Right, the doc says "This function ref's the AtkRelation so the caller of this function should unref it to ensure that it will be destroyed when the AtkRelationSet is destroyed." and I thought we need to ref it anyway. Seems we don't.