After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 478583 - atk_relation_set_add always adds relation to the set
atk_relation_set_add always adds relation to the set
Status: RESOLVED FIXED
Product: atk
Classification: Platform
Component: atk
1.9.x
Other Linux
: High normal
: ---
Assigned To: Li Yuan
Li Yuan
Depends on:
Blocks:
 
 
Reported: 2007-09-20 12:55 UTC by Andrey Tsyvarev
Modified: 2008-11-07 12:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.29 KB, patch)
2008-11-07 08:57 UTC, Li Yuan
committed Details | Review

Description Andrey Tsyvarev 2007-09-20 12:55:01 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
Comment 1 Li Yuan 2008-11-07 08:57:27 UTC
Created attachment 122172 [details] [review]
patch
Comment 2 Andrey Tsyvarev 2008-11-07 11:11:00 UTC
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.
Comment 3 Andrey Tsyvarev 2008-11-07 11:14:12 UTC
> 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.
Comment 4 Li Yuan 2008-11-07 12:28:35 UTC
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.