]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-contact.c
Make sure to not ref a NULL object
[empathy.git] / libempathy / empathy-contact.c
index 09da70fded012fe37e84eca462874ab93b3a23ca..d248b2dd7b71d7c46cd7293142274ee391c7094f 100644 (file)
@@ -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);