diff --git a/app/propgui/gimppropgui-generic.c b/app/propgui/gimppropgui-generic.c index 020c5e260b..eb40635d33 100644 --- a/app/propgui/gimppropgui-generic.c +++ b/app/propgui/gimppropgui-generic.c @@ -276,27 +276,21 @@ static void gimp_prop_gui_chain_toggled (GimpChainButton *chain, GtkAdjustment *x_adj) { + GBinding *binding; GtkAdjustment *y_adj; y_adj = g_object_get_data (G_OBJECT (x_adj), "y-adjustment"); if (gimp_chain_button_get_active (chain)) { - GBinding *binding; - binding = g_object_bind_property (x_adj, "value", y_adj, "value", G_BINDING_BIDIRECTIONAL); - - g_object_set_data (G_OBJECT (chain), "binding", binding); } else { - GBinding *binding; - binding = g_object_get_data (G_OBJECT (chain), "binding"); - - g_object_unref (binding); - g_object_set_data (G_OBJECT (chain), "binding", NULL); + g_clear_object (&binding); } + g_object_set_data (G_OBJECT (chain), "binding", binding); }