[gitg] Avoid disconnecting signal during handlers destroy



commit 67e5877849a4808b0436717f94caba42a755c4ac
Author: Jesse van den Kieboom <jessevdk gnome org>
Date:   Thu Dec 31 01:26:29 2015 +0100

    Avoid disconnecting signal during handlers destroy

 libgitg/gitg-when-mapped.vala |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libgitg/gitg-when-mapped.vala b/libgitg/gitg-when-mapped.vala
index 4142ab2..03b3071 100644
--- a/libgitg/gitg-when-mapped.vala
+++ b/libgitg/gitg-when-mapped.vala
@@ -38,6 +38,7 @@ namespace Gitg
                private void weak_notify(Object o)
                {
                        d_widget = null;
+                       d_sid = 0;
 
                        if (d_lifetime != null)
                        {
@@ -50,7 +51,7 @@ namespace Gitg
                {
                        if (d_widget != null)
                        {
-                               if (d_sid != 0)
+                               if (d_sid != 0 && SignalHandler.is_connected(d_widget, d_sid))
                                {
                                        d_widget.disconnect(d_sid);
                                }


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