aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dbus-listener.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dbus-listener.c b/src/dbus-listener.c
index 9143a25..7e3d7b5 100644
--- a/src/dbus-listener.c
+++ b/src/dbus-listener.c
@@ -112,6 +112,12 @@ indicator_power_dbus_listener_dispose (GObject *object)
g_clear_object (&priv->proxy);
g_clear_object (&priv->cancellable);
+ if (priv->watcher_id)
+ {
+ g_bus_unwatch_name (priv->watcher_id);
+ priv->watcher_id = 0;
+ }
+
G_OBJECT_CLASS (indicator_power_dbus_listener_parent_class)->dispose (object);
}