[gdm] Only disconnect loaded handler if connected



commit ad1cd9c302d8dec51ae62bcf9ba4cc132b584364
Author: Ray Strode <rstrode redhat com>
Date:   Fri Sep 10 13:28:57 2010 -0400

    Only disconnect loaded handler if connected

 gui/user-switch-applet/applet.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gui/user-switch-applet/applet.c b/gui/user-switch-applet/applet.c
index 4a4b41d..a0da74c 100644
--- a/gui/user-switch-applet/applet.c
+++ b/gui/user-switch-applet/applet.c
@@ -1274,7 +1274,9 @@ setup_current_user_now (GdmAppletData *adata)
 {
         g_assert (adata->user != NULL);
 
-        g_signal_handler_disconnect (adata->user, adata->user_loaded_notify_id);
+        if (adata->user_loaded_notify_id != 0) {
+                g_signal_handler_disconnect (adata->user, adata->user_loaded_notify_id);
+        }
         adata->user_loaded_notify_id = 0;
 
         update_label (adata);



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