summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Nagy <robert@openbsd.org>2020-12-04 15:21:14 +0100
committerRobert Nagy <robert@openbsd.org>2020-12-04 15:21:14 +0100
commite8960c0fb789e1ddefe5b4cbfcde4861f7fa3169 (patch)
treee50d4daaa52ae9f08dac2377e9eaa98dc72dfc27
parent7f6bf32c92890b9ebeac5e1fec092896729c9b9f (diff)
downloadConsoleKit2-e8960c0fb789e1ddefe5b4cbfcde4861f7fa3169.tar.gz
only disconnect the signal handler after the lock is removed
ck_inhibit_remove_lock() will end up emitting a changed signal so disconnecting the signal handler before that is not a good idea
-rw-r--r--src/ck-inhibit-manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ck-inhibit-manager.c b/src/ck-inhibit-manager.c
index 75bf2f6..3173373 100644
--- a/src/ck-inhibit-manager.c
+++ b/src/ck-inhibit-manager.c
@@ -260,10 +260,10 @@ ck_inhibit_manager_remove_lock (CkInhibitManager *manager,
/* Found it! Remove it from the list and unref the object */
priv->inhibit_list = g_list_remove (priv->inhibit_list, inhibit);
+ ck_inhibit_remove_lock (inhibit);
g_signal_handlers_disconnect_by_func (inhibit,
G_CALLBACK (cb_changed_event),
manager);
- ck_inhibit_remove_lock (inhibit);
g_object_unref (inhibit);
return TRUE;
}