]> git.0d.be Git - empathy.git/commitdiff
notify-manager: unref the account mgr when disposing
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 18 Nov 2009 23:09:53 +0000 (23:09 +0000)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 18 Nov 2009 23:12:11 +0000 (23:12 +0000)
libempathy-gtk/empathy-notify-manager.c

index 67e39ef1befb972511aa8044e0fcad8da67e6478..8f7991166044738a8f409ce9b811271dd56334ec 100644 (file)
@@ -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;