]> git.0d.be Git - empathy.git/commitdiff
Deal with empathy_create_individual_from_tp_contact() returning NULL
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 9 Dec 2011 09:54:26 +0000 (10:54 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 14 Dec 2011 09:52:33 +0000 (10:52 +0100)
Shouldn't really happen in practice but better to be safe than sorry.

https://bugzilla.gnome.org/show_bug.cgi?id=665853

libempathy-gtk/empathy-contact-chooser.c
libempathy-gtk/empathy-individual-store-channel.c

index cba419beac4459d39121ed17116e3a718bc433dd..97ce7d9d7e4a3df0284a427668ae2591bcc091b1 100644 (file)
@@ -221,6 +221,8 @@ get_contacts_cb (TpConnection *connection,
     return;
 
   individual =  empathy_create_individual_from_tp_contact (contacts[0]);
+  if (individual == NULL)
+    return;
 
   /* listen for updates to the capabilities */
   tp_g_signal_connect_object (contacts[0], "notify::capabilities",
index 75284602bc41aaca0caf8f58009bde6a8f4637db..76ff74e25c97029c7f61a7e0d42aa1b28b54d9a7 100644 (file)
@@ -82,6 +82,8 @@ add_members (EmpathyIndividualStoreChannel *self,
         continue;
 
       individual = empathy_create_individual_from_tp_contact (contact);
+      if (individual == NULL)
+        return;
 
       DEBUG ("%s joined channel %s", tp_contact_get_identifier (contact),
           tp_proxy_get_object_path (self->priv->channel));