diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-07-01 12:33:08 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2013-07-01 12:33:08 -0500 |
commit | b252745c8111c9be1d7e95a88daab1e2568b1afc (patch) | |
tree | 202191c71650a221d1c29f63540158600a61cac8 /src/backend-dbus | |
parent | 974a5ecba82e944b74ecf14699e032579d519250 (diff) | |
download | ayatana-indicator-session-b252745c8111c9be1d7e95a88daab1e2568b1afc.tar.gz ayatana-indicator-session-b252745c8111c9be1d7e95a88daab1e2568b1afc.tar.bz2 ayatana-indicator-session-b252745c8111c9be1d7e95a88daab1e2568b1afc.zip |
in backend-dbus/actions.c's set_login1_seat(), disconnect from the previous seat's signals before unreff'ing it
Diffstat (limited to 'src/backend-dbus')
-rw-r--r-- | src/backend-dbus/actions.c | 9 |
1 files 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); } } |