diff options
author | Denis Washington <denisw@src.gnome.org> | 2011-08-14 15:44:31 +0200 |
---|---|---|
committer | Denis Washington <denisw@src.gnome.org> | 2011-08-14 15:44:31 +0200 |
commit | 923072a4a06172897b28f49cedba82a785cabe19 (patch) | |
tree | 69d2cccdc4434f4e4ec02f311025f79e0b82cd05 | |
parent | c3472569959b655640b2bee8a54a4960edba22b6 (diff) | |
download | glade-923072a4a06172897b28f49cedba82a785cabe19.tar.gz |
Fix assertion failure warnings
-rw-r--r-- | gladeui/glade-property.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/gladeui/glade-property.c b/gladeui/glade-property.c index 1d02a316..548aee0a 100644 --- a/gladeui/glade-property.c +++ b/gladeui/glade-property.c @@ -1806,16 +1806,18 @@ glade_property_remove_binding_source (GladeProperty *property) GladeProject *project; if ((old_source = property->priv->binding_source) != NULL) + { g_object_weak_unref (G_OBJECT (old_source), (GWeakNotify) glade_property_binding_source_weak_notify_cb, property); - if (property->priv->binding_value_handler > 0) - g_signal_handler_disconnect (old_source, property->priv->binding_value_handler); - if (property->priv->binding_enabled_handler > 0) - g_signal_handler_disconnect (old_source, property->priv->binding_enabled_handler); - if (property->priv->binding_sensitive_handler > 0) - g_signal_handler_disconnect (old_source, property->priv->binding_sensitive_handler); + if (property->priv->binding_value_handler > 0) + g_signal_handler_disconnect (old_source, property->priv->binding_value_handler); + if (property->priv->binding_enabled_handler > 0) + g_signal_handler_disconnect (old_source, property->priv->binding_enabled_handler); + if (property->priv->binding_sensitive_handler > 0) + g_signal_handler_disconnect (old_source, property->priv->binding_sensitive_handler); + } property->priv->binding_value_handler = 0; property->priv->binding_enabled_handler = 0; @@ -1839,15 +1841,15 @@ glade_property_remove_binding_source (GladeProperty *property) * finalization almost always means that the project is being * finalized too, this isn't a big problem.) */ - if (!project) - return; - - if (property->priv->binding_widget_remove_handler > 0) - g_signal_handler_disconnect (project, - property->priv->binding_widget_remove_handler); - if (property->priv->binding_widget_add_handler > 0) - g_signal_handler_disconnect (project, - property->priv->binding_widget_add_handler); + if (project) + { + if (property->priv->binding_widget_remove_handler > 0) + g_signal_handler_disconnect (project, + property->priv->binding_widget_remove_handler); + if (property->priv->binding_widget_add_handler > 0) + g_signal_handler_disconnect (project, + property->priv->binding_widget_add_handler); + } property->priv->binding_widget_remove_handler = 0; property->priv->binding_widget_add_handler = 0; |