aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-contact.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-04-02 17:42:22 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-04-02 17:42:22 +0800
commit20461f6167635f92b05e4fa1c029f27703208dd6 (patch)
treee1c54ba60550256394c33900d67d086826681c8c /libempathy/empathy-contact.c
parentb3d52ddf377b54ad6ee9c66ec2fa03486c91278d (diff)
downloadgsoc2013-empathy-20461f6167635f92b05e4fa1c029f27703208dd6.tar
gsoc2013-empathy-20461f6167635f92b05e4fa1c029f27703208dd6.tar.gz
gsoc2013-empathy-20461f6167635f92b05e4fa1c029f27703208dd6.tar.bz2
gsoc2013-empathy-20461f6167635f92b05e4fa1c029f27703208dd6.tar.lz
gsoc2013-empathy-20461f6167635f92b05e4fa1c029f27703208dd6.tar.xz
gsoc2013-empathy-20461f6167635f92b05e4fa1c029f27703208dd6.tar.zst
gsoc2013-empathy-20461f6167635f92b05e4fa1c029f27703208dd6.zip
ref the contact temporally when setting properties because it could destroy the object.
svn path=/trunk/; revision=855
Diffstat (limited to 'libempathy/empathy-contact.c')
-rw-r--r--libempathy/empathy-contact.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c
index ec91f3a00..d1c6b8284 100644
--- a/libempathy/empathy-contact.c
+++ b/libempathy/empathy-contact.c
@@ -381,13 +381,14 @@ empathy_contact_set_id (EmpathyContact *contact,
g_free (priv->id);
priv->id = g_strdup (id);
+ g_object_ref (contact);
contact_set_ready_flag (contact, EMPATHY_CONTACT_READY_ID,
!G_STR_EMPTY (id));
-
g_object_notify (G_OBJECT (contact), "id");
if (G_STR_EMPTY (priv->name)) {
g_object_notify (G_OBJECT (contact), "name");
}
+ g_object_unref (contact);
}
const gchar *
@@ -422,10 +423,12 @@ empathy_contact_set_name (EmpathyContact *contact,
g_free (priv->name);
priv->name = g_strdup (name);
+
+ g_object_ref (contact);
contact_set_ready_flag (contact, EMPATHY_CONTACT_READY_NAME,
name != NULL);
-
g_object_notify (G_OBJECT (contact), "name");
+ g_object_unref (contact);
}
EmpathyAvatar *
@@ -589,10 +592,12 @@ empathy_contact_set_handle (EmpathyContact *contact,
}
priv->handle = handle;
+
+ g_object_ref (contact);
contact_set_ready_flag (contact, EMPATHY_CONTACT_READY_HANDLE,
handle != 0);
-
g_object_notify (G_OBJECT (contact), "handle");
+ g_object_unref (contact);
}
EmpathyCapabilities