[gnome-photos/wip/flickr: 7/14] embed: Prevent signal handlers from being disconnected twice



commit b6fe81813f91d22b9bbe7b1f77c532a331be1131
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Jul 1 16:27:25 2013 +0200

    embed: Prevent signal handlers from being disconnected twice

 src/photos-embed.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-embed.c b/src/photos-embed.c
index e93934b..ddfa5bf 100644
--- a/src/photos-embed.c
+++ b/src/photos-embed.c
@@ -398,7 +398,11 @@ photos_embed_dispose (GObject *object)
    * the parent implementation, or photos_embed_notify_visible_child() will
    * get called while we're in a inconsistent state
    */
-  g_signal_handlers_disconnect_by_func (priv->stack, photos_embed_notify_visible_child, self);
+  if (priv->stack != NULL)
+    {
+      g_signal_handlers_disconnect_by_func (priv->stack, photos_embed_notify_visible_child, self);
+      priv->stack = NULL;
+    }
 
   G_OBJECT_CLASS (photos_embed_parent_class)->dispose (object);
 }



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