GNOME Bugzilla – Bug 749352
g_binding_unbind() fails when source is also the target
Last modified: 2015-05-14 10:59:53 UTC
Using g_binding_unbind() fails when the source object is also the target object, discovered while writing tests for EggBindingSet[1]. The issue is that g_binding_unbind() tries to remove a weak ref but that weak ref is only taken if the source and target objects are different[2]. 1. https://git.gnome.org/browse/gnome-builder/tree/contrib/egg/egg-binding-set.c 2. https://git.gnome.org/browse/glib/tree/gobject/gbinding.c#n599
Created attachment 303345 [details] [review] Fix g_binding_unbind() when the source and target are the same It tried to remove a weak ref, but it is only taken if the source and target object are different.
Nice, thanks for finding this in EggBindingSet and for tracking it down in GBinding! CC'ing ebassi for review though
Review of attachment 303345 [details] [review]: Looks good.
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.