]> git.0d.be Git - empathy.git/commitdiff
Merge branch 'gnome-3-8'
authorXavier Claessens <xavier.claessens@collabora.co.uk>
Tue, 7 May 2013 13:24:13 +0000 (15:24 +0200)
committerXavier Claessens <xavier.claessens@collabora.co.uk>
Tue, 7 May 2013 13:24:13 +0000 (15:24 +0200)
1  2 
libempathy-gtk/empathy-user-info.c

index e63f320fe9c0a9d663cc823f2db5e7a388fbbe95,77b0798f26c5194bfc78c389d91550f65515cd0c..451caec8e9fcfe9f508c14cef271119e9e3f8b18
  
  #include <glib/gi18n-lib.h>
  
 -#define DEBUG_FLAG EMPATHY_DEBUG_CONTACT
 -#include <libempathy/empathy-debug.h>
 -#include <libempathy/empathy-time.h>
 -#include <libempathy/empathy-utils.h>
 -
  #include "empathy-avatar-chooser.h"
  #include "empathy-calendar-button.h"
  #include "empathy-contactinfo-utils.h"
 +#include "empathy-time.h"
 +#include "empathy-utils.h"
 +
 +#define DEBUG_FLAG EMPATHY_DEBUG_CONTACT
 +#include "empathy-debug.h"
  
  G_DEFINE_TYPE (EmpathyUserInfo, empathy_user_info, GTK_TYPE_GRID)
  
@@@ -192,6 -192,17 +192,17 @@@ fill_contact_info_grid (EmpathyUserInf
      {
        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);