[next] telepathy-glib: TpChannel: make sure it does not get finalize while upgrade its contacts
Xavier Claessens
xclaesse at kemper.freedesktop.org
Fri May 11 08:49:43 PDT 2012
Module: telepathy-glib
Branch: next
Commit: 6c61c62e9e94f5ec55b199f04422ea00e7e7c597
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=6c61c62e9e94f5ec55b199f04422ea00e7e7c597
Author: Xavier Claessens <xavier.claessens at collabora.co.uk>
Date: Fri May 11 17:35:14 2012 +0200
TpChannel: make sure it does not get finalize while upgrade its contacts
---
telepathy-glib/channel.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/telepathy-glib/channel.c b/telepathy-glib/channel.c
index 49e72a9..3388c01 100644
--- a/telepathy-glib/channel.c
+++ b/telepathy-glib/channel.c
@@ -887,10 +887,13 @@ upgrade_contacts_cb (GObject *object,
_tp_channel_abort_introspection (self, "Upgrading contacts failed",
error);
g_clear_error (&error);
- return;
+ }
+ else
+ {
+ _tp_channel_continue_introspection (self);
}
- _tp_channel_continue_introspection (self);
+ g_object_unref (self);
}
static void
@@ -957,7 +960,7 @@ _tp_channel_create_contacts (TpChannel *self)
tp_connection_upgrade_contacts_async (self->priv->connection,
contacts->len, (TpContact **) contacts->pdata,
(GQuark *) features->data,
- upgrade_contacts_cb, self);
+ upgrade_contacts_cb, g_object_ref (self));
g_array_unref (features);
}
More information about the telepathy-commits
mailing list