[glade/gbinding: 49/60] Fix assertion failure warnings



commit e84f1ec87aa5235af5a1516d2656773e961b5eda
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 b42ce63..f9c230a 100644
--- a/gladeui/glade-property.c
+++ b/gladeui/glade-property.c
@@ -1805,16 +1805,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;
@@ -1838,15 +1840,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]