diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-06-06 14:42:23 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2012-06-06 14:42:23 -0500 |
commit | 79d37d6827bdfd9b1a94ce6918157ce475bc012a (patch) | |
tree | 21f1e296090da2bc70c04e845af36fd2ee3bc6d0 /src | |
parent | f2310de23a3012fd579a659a99b09b030e9df108 (diff) | |
download | ayatana-indicator-power-79d37d6827bdfd9b1a94ce6918157ce475bc012a.tar.gz ayatana-indicator-power-79d37d6827bdfd9b1a94ce6918157ce475bc012a.tar.bz2 ayatana-indicator-power-79d37d6827bdfd9b1a94ce6918157ce475bc012a.zip |
add g_bus_unwatch_name() to watcher's dispose() method
Diffstat (limited to 'src')
-rw-r--r-- | src/dbus-listener.c | 6 |
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); } |