summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.co.uk>2013-05-07 15:14:48 +0200
committerXavier Claessens <xavier.claessens@collabora.co.uk>2013-05-07 15:24:04 +0200
commitadd79d54e3c0149a2c336077d1e37c60d54c5ace (patch)
tree5fa06b022d662f9de07549b472a2d4db40d6adac
parente4dbe9ffb7c239cb2ea304a9a13fcfa6573c63e1 (diff)
Fix crash when displaying google account vcard
-rw-r--r--libempathy-gtk/empathy-user-info.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-user-info.c b/libempathy-gtk/empathy-user-info.c
index 4c9a2dee..77b0798f 100644
--- a/libempathy-gtk/empathy-user-info.c
+++ b/libempathy-gtk/empathy-user-info.c
@@ -192,6 +192,17 @@ fill_contact_info_grid (EmpathyUserInfo *self)
{
TpContactInfoField *field = l->data;
+ /* For some reason it can happen that the vCard contains fields the CM
+ * claims to be not supported. This is a workaround for gabble bug
+ * https://bugs.freedesktop.org/show_bug.cgi?id=64319. But we shouldn't
+ * crash on buggy CM anyway. */
+ if (get_spec_from_list (specs, field->field_name) == NULL)
+ {
+ DEBUG ("Buggy CM: self's vCard contains %s field but it is not in "
+ "Connection' supported fields", field->field_name);
+ continue;
+ }
+
/* make a copy for the details_to_set list */
field = tp_contact_info_field_copy (field);
DEBUG ("Field %s is in our vCard", field->field_name);