aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2008-05-09 01:30:29 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2008-05-09 01:30:29 +0800
commitdd5f0a2f29b10052287ead542e04c5bbfb45f87d (patch)
tree7ac092936501aa3b6f93db5e86a063abd5657f8d
parentec16a10c802f7141828bf0c8e851770894637f0a (diff)
downloadgsoc2013-empathy-dd5f0a2f29b10052287ead542e04c5bbfb45f87d.tar
gsoc2013-empathy-dd5f0a2f29b10052287ead542e04c5bbfb45f87d.tar.gz
gsoc2013-empathy-dd5f0a2f29b10052287ead542e04c5bbfb45f87d.tar.bz2
gsoc2013-empathy-dd5f0a2f29b10052287ead542e04c5bbfb45f87d.tar.lz
gsoc2013-empathy-dd5f0a2f29b10052287ead542e04c5bbfb45f87d.tar.xz
gsoc2013-empathy-dd5f0a2f29b10052287ead542e04c5bbfb45f87d.tar.zst
gsoc2013-empathy-dd5f0a2f29b10052287ead542e04c5bbfb45f87d.zip
Ref the call object when emiting notify signals because signal handles could unref it
git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1089 4ee84921-47dd-4033-b63a-18d7a039a3e4
-rw-r--r--libempathy/empathy-tp-call.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libempathy/empathy-tp-call.c b/libempathy/empathy-tp-call.c
index 03dff8033..4dab14a1e 100644
--- a/libempathy/empathy-tp-call.c
+++ b/libempathy/empathy-tp-call.c
@@ -272,16 +272,18 @@ tp_call_member_added_cb (EmpathyTpGroup *group,
{
EmpathyTpCallPriv *priv = GET_PRIV (call);
+ g_object_ref (call);
if (!priv->contact && !empathy_contact_is_user (contact))
{
priv->contact = g_object_ref (contact);
priv->is_incoming = TRUE;
priv->status = EMPATHY_TP_CALL_STATUS_PENDING;
g_object_notify (G_OBJECT (call), "is-incoming");
- g_object_notify (G_OBJECT (call), "contact");
- g_object_notify (G_OBJECT (call), "status");
+ g_object_notify (G_OBJECT (call), "contact");
+ g_object_notify (G_OBJECT (call), "status");
tp_call_request_streams_for_capabilities (call,
EMPATHY_CAPABILITIES_AUDIO);
+
}
if (priv->status == EMPATHY_TP_CALL_STATUS_PENDING &&
@@ -291,6 +293,7 @@ tp_call_member_added_cb (EmpathyTpGroup *group,
priv->status = EMPATHY_TP_CALL_STATUS_ACCEPTED;
g_object_notify (G_OBJECT (call), "status");
}
+ g_object_unref (call);
}
static void
@@ -303,6 +306,7 @@ tp_call_remote_pending_cb (EmpathyTpGroup *group,
{
EmpathyTpCallPriv *priv = GET_PRIV (call);
+ g_object_ref (call);
if (!priv->contact && !empathy_contact_is_user (contact))
{
priv->contact = g_object_ref (contact);
@@ -314,6 +318,7 @@ tp_call_remote_pending_cb (EmpathyTpGroup *group,
tp_call_request_streams_for_capabilities (call,
EMPATHY_CAPABILITIES_AUDIO);
}
+ g_object_unref (call);
}
static void