From 43810b24c12d81f26f4d38035ae911a1a7a0bbcc Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 28 Oct 2010 09:31:54 +0200 Subject: chatroom-manager: ensure that we stay alive while preparing the AM 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 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libempathy/empathy-chatroom-manager.c b/libempathy/empathy-chatroom-manager.c index 115e4158c..1107c4fa2 100644 --- a/libempathy/empathy-chatroom-manager.c +++ b/libempathy/empathy-chatroom-manager.c @@ -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) { -- cgit v1.2.3