[glade/gbinding] Fix assertion failure warnings



commit 923072a4a06172897b28f49cedba82a785cabe19
Author: Denis Washington <denisw src gnome org>
Date:   Sun Aug 14 15:44:31 2011 +0200

    Fix assertion failure warnings

 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 1d02a31..548aee0 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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]