aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-09-16 16:26:42 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-09-16 16:26:55 +0800
commite3ac85477f053b98531e1b295c498b41659ab0eb (patch)
tree433401ca0745e69bc58e31506ebf3da4b19b1a32 /libempathy
parent708aa24958f0e211f8582e3662b149f4ddb1305b (diff)
downloadgsoc2013-empathy-e3ac85477f053b98531e1b295c498b41659ab0eb.tar
gsoc2013-empathy-e3ac85477f053b98531e1b295c498b41659ab0eb.tar.gz
gsoc2013-empathy-e3ac85477f053b98531e1b295c498b41659ab0eb.tar.bz2
gsoc2013-empathy-e3ac85477f053b98531e1b295c498b41659ab0eb.tar.lz
gsoc2013-empathy-e3ac85477f053b98531e1b295c498b41659ab0eb.tar.xz
gsoc2013-empathy-e3ac85477f053b98531e1b295c498b41659ab0eb.tar.zst
gsoc2013-empathy-e3ac85477f053b98531e1b295c498b41659ab0eb.zip
tp-roomlist: ensure that we stay alive during the create_and_handle_channel async call
https://bugzilla.gnome.org/show_bug.cgi?id=658909
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-tp-roomlist.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libempathy/empathy-tp-roomlist.c b/libempathy/empathy-tp-roomlist.c
index d66bfc0f1..79516a5f0 100644
--- a/libempathy/empathy-tp-roomlist.c
+++ b/libempathy/empathy-tp-roomlist.c
@@ -275,7 +275,7 @@ tp_roomlist_create_channel_cb (GObject *source,
if (priv->channel == NULL) {
DEBUG ("Error creating channel: %s", error->message);
g_error_free (error);
- return;
+ goto out;
}
g_signal_connect (priv->channel, "invalidated",
@@ -302,6 +302,9 @@ tp_roomlist_create_channel_cb (GObject *source,
call_list_rooms_cb, self, NULL, NULL);
priv->start_requested = FALSE;
}
+
+out:
+ g_object_unref (self);
}
static void
@@ -348,6 +351,9 @@ tp_roomlist_constructed (GObject *list)
req = tp_account_channel_request_new (priv->account, request,
TP_USER_ACTION_TIME_CURRENT_TIME);
+ /* Ensure we stay alive during the async call */
+ g_object_ref (list);
+
tp_account_channel_request_create_and_handle_channel_async (req, NULL,
tp_roomlist_create_channel_cb, list);