Commit bd7592df authored by Ray Strode's avatar Ray Strode

inhibitor: don't try to access inhibitor after it's vanished

After we emit the vanished signal on the inhibitor it's likely
to get freed, so don't try to use it from that point forward.
parent 8b70a2e2
......@@ -250,9 +250,10 @@ on_inhibitor_vanished (GDBusConnection *connection,
GsmInhibitor *inhibitor = user_data;
g_signal_emit (inhibitor, signals[VANISHED], 0);
g_bus_unwatch_name (inhibitor->priv->watch_id);
inhibitor->priv->watch_id = 0;
g_signal_emit (inhibitor, signals[VANISHED], 0);
static void
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment