From b252745c8111c9be1d7e95a88daab1e2568b1afc Mon Sep 17 00:00:00 2001
From: Charles Kerr <charles.kerr@canonical.com>
Date: Mon, 1 Jul 2013 12:33:08 -0500
Subject: in backend-dbus/actions.c's set_login1_seat(), disconnect from the
 previous seat's signals before unreff'ing it

---
 src/backend-dbus/actions.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/backend-dbus/actions.c b/src/backend-dbus/actions.c
index 67fe9f1..8c1b70b 100644
--- a/src/backend-dbus/actions.c
+++ b/src/backend-dbus/actions.c
@@ -99,13 +99,18 @@ set_login1_seat (IndicatorSessionActionsDbus * self, Login1Seat * seat)
 {
   priv_t * p = self->priv;
 
-  g_clear_object (&p->login1_seat);
+  if (p->login1_seat != NULL)
+    {
+      g_signal_handlers_disconnect_by_data (p->login1_seat, self);
+      g_clear_object (&p->login1_seat);
+    }
 
   if (seat != NULL)
     {
       p->login1_seat = g_object_ref (seat);
 
-      g_signal_connect_swapped (seat, "notify::can-multi-session", G_CALLBACK(on_seat_notify_multi_session), self);
+      g_signal_connect_swapped (seat, "notify::can-multi-session",
+                                G_CALLBACK(on_seat_notify_multi_session), self);
     }
 }
 
-- 
cgit v1.2.3