aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2009-02-17 23:11:48 +0800
committerXavier Claessens <xclaesse@gmail.com>2009-04-22 18:21:11 +0800
commitb19d8cde60b98f0f86a49a8eed0885222e808f2f (patch)
tree1224f9811f0e174e35a51fd3de2a6b7f5356c801 /libempathy
parent3710528cebb73a471674af5ee478d5c24cff547d (diff)
downloadgsoc2013-empathy-b19d8cde60b98f0f86a49a8eed0885222e808f2f.tar
gsoc2013-empathy-b19d8cde60b98f0f86a49a8eed0885222e808f2f.tar.gz
gsoc2013-empathy-b19d8cde60b98f0f86a49a8eed0885222e808f2f.tar.bz2
gsoc2013-empathy-b19d8cde60b98f0f86a49a8eed0885222e808f2f.tar.lz
gsoc2013-empathy-b19d8cde60b98f0f86a49a8eed0885222e808f2f.tar.xz
gsoc2013-empathy-b19d8cde60b98f0f86a49a8eed0885222e808f2f.tar.zst
gsoc2013-empathy-b19d8cde60b98f0f86a49a8eed0885222e808f2f.zip
Make sure to not ref a NULL object
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-contact.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c
index 09da70fde..d248b2dd7 100644
--- a/libempathy/empathy-contact.c
+++ b/libempathy/empathy-contact.c
@@ -274,6 +274,9 @@ set_tp_contact (EmpathyContact *contact,
{
EmpathyContactPriv *priv = GET_PRIV (contact);
+ if (tp_contact == NULL)
+ return;
+
g_assert (priv->tp_contact == NULL);
priv->tp_contact = g_object_ref (tp_contact);
priv->presence = empathy_contact_get_presence (contact);