aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-utils.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2007-09-29 21:31:57 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-09-29 21:31:57 +0800
commit4b3253600828b21e708eb05a3ae68427b199276e (patch)
tree983810bb6170a64ed38726985dab16897c4611f7 /libempathy/empathy-utils.c
parent925d8ff26c23f281527ae881106967b55826baac (diff)
downloadgsoc2013-empathy-4b3253600828b21e708eb05a3ae68427b199276e.tar
gsoc2013-empathy-4b3253600828b21e708eb05a3ae68427b199276e.tar.gz
gsoc2013-empathy-4b3253600828b21e708eb05a3ae68427b199276e.tar.bz2
gsoc2013-empathy-4b3253600828b21e708eb05a3ae68427b199276e.tar.lz
gsoc2013-empathy-4b3253600828b21e708eb05a3ae68427b199276e.tar.xz
gsoc2013-empathy-4b3253600828b21e708eb05a3ae68427b199276e.tar.zst
gsoc2013-empathy-4b3253600828b21e708eb05a3ae68427b199276e.zip
ref group when async calls are in flight to avoid destroying the object
2007-09-29 Xavier Claessens <xclaesse@gmail.com> * libempathy/empathy-tp-group.c: ref group when async calls are in flight to avoid destroying the object before receiving the reply. * libempathy/empathy-utils.c: Unref the group to not leak it. svn path=/trunk/; revision=341
Diffstat (limited to 'libempathy/empathy-utils.c')
-rw-r--r--libempathy/empathy-utils.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index f33d83e48..e90521b05 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -509,14 +509,10 @@ empathy_call_contact (EmpathyContact *contact)
TP_HANDLE_TYPE_NONE,
0);
- /* FIXME: group is leaked, we can't unref it directly because
- * _add_member is async so we have to wait for it to return before
- * finalizing the group. I think EmpathyTpGroup should ref itself
- * when it does async calls to avoid finalizing when there is calls
- * in fligth like that we could unref it here. */
group = empathy_tp_group_new (account, new_chan);
empathy_tp_group_add_member (group, contact, "");
+ g_object_unref (group);
g_object_unref (mc);
g_object_unref (tp_conn);
g_object_unref (new_chan);