diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-06-06 14:47:08 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2012-06-06 14:47:08 -0500 |
commit | fcd052a49adf44c55a689a03fd5ced85369c7a5a (patch) | |
tree | 6f08ea2731ad8423c2864c4968037c35c59c87d5 | |
parent | 5cac4ebb939cde67c78cf8aa59d27beafd187ac8 (diff) | |
download | ayatana-indicator-power-fcd052a49adf44c55a689a03fd5ced85369c7a5a.tar.gz ayatana-indicator-power-fcd052a49adf44c55a689a03fd5ced85369c7a5a.tar.bz2 ayatana-indicator-power-fcd052a49adf44c55a689a03fd5ced85369c7a5a.zip |
if self->cancellable is non-NULL in dispose(), pass it to g_cancellable_cancel() before clearing the listener's reference
-rw-r--r-- | src/dbus-listener.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/dbus-listener.c b/src/dbus-listener.c index 4923fe1..34df925 100644 --- a/src/dbus-listener.c +++ b/src/dbus-listener.c @@ -110,7 +110,12 @@ indicator_power_dbus_listener_dispose (GObject *object) IndicatorPowerDbusListenerPrivate * priv = self->priv; g_clear_object (&priv->proxy); - g_clear_object (&priv->cancellable); + + if (priv->cancellable != NULL) + { + g_cancellable_cancel (priv->cancellable); + g_clear_object (&priv->cancellable); + } if (priv->watcher_id) { |