(Follow-up of bug #704895) [Google book] Removal of a nickname throws an error
authorMilan Crha <mcrha@redhat.com>
Tue, 30 Jul 2013 09:21:30 +0000 (11:21 +0200)
committerMilan Crha <mcrha@redhat.com>
Tue, 30 Jul 2013 09:21:30 +0000 (11:21 +0200)
addressbook/backends/google/e-book-google-utils.c

index 0cb6319..65e682b 100644 (file)
@@ -198,7 +198,7 @@ gdata_entry_update_from_e_contact (GDataEntry *entry,
 
        /* Nickname */
        nickname = e_contact_get (contact, E_CONTACT_NICKNAME);
-       gdata_contacts_contact_set_nickname (GDATA_CONTACTS_CONTACT (entry), nickname);
+       gdata_contacts_contact_set_nickname (GDATA_CONTACTS_CONTACT (entry), nickname && *nickname ? nickname : NULL);
        g_free (nickname);
 
        /* Clear out all the old attributes */