[empathy] Deal with empathy_create_individual_from_tp_contact() returning NULL
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] Deal with empathy_create_individual_from_tp_contact() returning NULL
- Date: Wed, 14 Dec 2011 09:57:56 +0000 (UTC)
commit 844b932834beb6f15d454d14662ca7719bb28981
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Fri Dec 9 10:54:26 2011 +0100
Deal with empathy_create_individual_from_tp_contact() returning NULL
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 | 2 ++
libempathy-gtk/empathy-individual-store-channel.c | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-contact-chooser.c b/libempathy-gtk/empathy-contact-chooser.c
index cba419b..97ce7d9 100644
--- a/libempathy-gtk/empathy-contact-chooser.c
+++ b/libempathy-gtk/empathy-contact-chooser.c
@@ -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",
diff --git a/libempathy-gtk/empathy-individual-store-channel.c b/libempathy-gtk/empathy-individual-store-channel.c
index 7528460..76ff74e 100644
--- a/libempathy-gtk/empathy-individual-store-channel.c
+++ b/libempathy-gtk/empathy-individual-store-channel.c
@@ -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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]