aboutsummaryrefslogtreecommitdiff
path: root/src/backend-dbus
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend-dbus')
-rw-r--r--src/backend-dbus/actions.c9
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);
}
}