From 60c2ae4d365feeecedc7bd7bfc3897b6b48f7652 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Thu, 20 Mar 2014 16:13:38 -0400 Subject: [PATCH] EvolutionContactSource: Skip empty contacts https://bugs.freedesktop.org/show_bug.cgi?id=76375 --- src/backends/evolution/EvolutionContactSource.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/backends/evolution/EvolutionContactSource.cpp b/src/backends/evolution/EvolutionContactSource.cpp index 60ff94c..7aa8cab 100644 --- a/src/backends/evolution/EvolutionContactSource.cpp +++ b/src/backends/evolution/EvolutionContactSource.cpp @@ -1031,6 +1031,11 @@ EvolutionContactSource::insertItem(const string &uid, const std::string &item, b { EContactCXX contact(e_contact_new_from_vcard(item.c_str()), TRANSFER_REF); if (contact) { + if (e_vcard_get_attributes (&contact->parent) == NULL) { + /* We are not inserting empty contact */ + return InsertItemResult("", "", ITEM_OKAY); + } + e_contact_set(contact, E_CONTACT_UID, uid.empty() ? NULL : -- 1.9.1