[telepathy-mission-control/master] mcd_client_proxy_unique_name_cb: ensure that _mcd_client_proxy_set_inactive() doesn't cause self to be freed before calling mcd_client_proxy_introspect
Simon McVittie
simon.mcvittie at collabora.co.uk
Tue Oct 20 09:59:27 PDT 2009
tp_dbus_daemon_watch_name_owner doesn't take a closure, so we have to ref
it ourselves.
---
src/mcd-client.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/mcd-client.c b/src/mcd-client.c
index defdac6..e16c7e4 100644
--- a/src/mcd-client.c
+++ b/src/mcd-client.c
@@ -865,6 +865,8 @@ mcd_client_proxy_unique_name_cb (TpDBusDaemon *dbus_daemon,
{
McdClientProxy *self = MCD_CLIENT_PROXY (user_data);
+ g_object_ref (self);
+
if (unique_name == NULL || unique_name[0] == '\0')
{
_mcd_client_proxy_set_inactive (self);
@@ -875,6 +877,8 @@ mcd_client_proxy_unique_name_cb (TpDBusDaemon *dbus_daemon,
}
mcd_client_proxy_introspect (self);
+
+ g_object_unref (self);
}
static void
--
1.5.6.5
More information about the telepathy-commits
mailing list