]> git.0d.be Git - empathy.git/commitdiff
chatroom-manager: ensure that we stay alive while preparing the AM
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 28 Oct 2010 07:31:54 +0000 (09:31 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 28 Oct 2010 07:31:54 +0000 (09:31 +0200)
This manager uses to be always alive but that's not longer tree since we
splitted the chat client (#633329).

libempathy/empathy-chatroom-manager.c

index 115e4158ce4b78fd6b46513059093930a5c84357..1107c4fa20dbd895f6a346457efed6960bc94701 100644 (file)
@@ -421,10 +421,13 @@ account_manager_ready_cb (GObject *source_object,
     {
       DEBUG ("Failed to prepare account manager: %s", error->message);
       g_error_free (error);
-      return;
+      goto out;
     }
 
   chatroom_manager_get_all (self);
+
+out:
+  g_object_unref (self);
 }
 
 static GObject *
@@ -454,7 +457,7 @@ empathy_chatroom_manager_constructor (GType type,
   priv->account_manager = tp_account_manager_dup ();
 
   tp_account_manager_prepare_async (priv->account_manager, NULL,
-      account_manager_ready_cb, self);
+      account_manager_ready_cb, g_object_ref (self));
 
   if (priv->file == NULL)
     {