diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-11-19 07:09:53 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-11-19 07:12:11 +0800 |
commit | eaf0587c3c9d674eca2350dec5a2f5c87705f402 (patch) | |
tree | f138e045fdd64f923d2249de24024e33c64d1fb0 | |
parent | 0805caad8bb48b83e74648dbb3be85fd2869b541 (diff) | |
download | gsoc2013-empathy-eaf0587c3c9d674eca2350dec5a2f5c87705f402.tar gsoc2013-empathy-eaf0587c3c9d674eca2350dec5a2f5c87705f402.tar.gz gsoc2013-empathy-eaf0587c3c9d674eca2350dec5a2f5c87705f402.tar.bz2 gsoc2013-empathy-eaf0587c3c9d674eca2350dec5a2f5c87705f402.tar.lz gsoc2013-empathy-eaf0587c3c9d674eca2350dec5a2f5c87705f402.tar.xz gsoc2013-empathy-eaf0587c3c9d674eca2350dec5a2f5c87705f402.tar.zst gsoc2013-empathy-eaf0587c3c9d674eca2350dec5a2f5c87705f402.zip |
notify-manager: unref the account mgr when disposing
-rw-r--r-- | libempathy-gtk/empathy-notify-manager.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-notify-manager.c b/libempathy-gtk/empathy-notify-manager.c index 67e39ef1b..8f7991166 100644 --- a/libempathy-gtk/empathy-notify-manager.c +++ b/libempathy-gtk/empathy-notify-manager.c @@ -68,6 +68,20 @@ notify_manager_constructor (GType type, } static void +notify_manager_dispose (GObject *object) +{ + EmpathyNotifyManagerPriv *priv = GET_PRIV (object); + + if (priv->account_manager != NULL) + { + g_object_unref (priv->account_manager); + priv->account_manager = NULL; + } + + G_OBJECT_CLASS (empathy_notify_manager_parent_class)->dispose (object); +} + +static void notify_manager_finalize (GObject *object) { EmpathyNotifyManagerPriv *priv = GET_PRIV (object); @@ -82,6 +96,7 @@ empathy_notify_manager_class_init (EmpathyNotifyManagerClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); + object_class->dispose = notify_manager_dispose; object_class->finalize = notify_manager_finalize; object_class->constructor = notify_manager_constructor; |