From eaf0587c3c9d674eca2350dec5a2f5c87705f402 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 18 Nov 2009 23:09:53 +0000 Subject: notify-manager: unref the account mgr when disposing --- libempathy-gtk/empathy-notify-manager.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'libempathy-gtk/empathy-notify-manager.c') 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 @@ -67,6 +67,20 @@ notify_manager_constructor (GType type, return retval; } +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) { @@ -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; -- cgit v1.2.3