From e31cb5c9e9392db00c48aa883c2f54a3b48eaea1 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 16 Aug 2013 11:41:26 +0200 Subject: [PATCH] Cannot create appointments (regression from bug #702922) (cherry picked from commit 286ab97d76d02a6c6a77ad919dc9d87703536d4b) --- src/calendar/e-cal-backend-ews-utils.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/calendar/e-cal-backend-ews-utils.c b/src/calendar/e-cal-backend-ews-utils.c index a326391..36116cc 100644 --- a/src/calendar/e-cal-backend-ews-utils.c +++ b/src/calendar/e-cal-backend-ews-utils.c @@ -65,8 +65,16 @@ e_ews_collect_attendees (icalcomponent *comp, prop = icalcomponent_get_next_property (comp, ICAL_ATTENDEE_PROPERTY)) { str = icalproperty_get_attendee (prop); + + if (!str || !*str) + continue; + /* figure the email address of the attendee, discard "mailto:" if it's there */ - if (!g_ascii_strncasecmp (str, "mailto:", 7)) str = (str) + 7; + if (!g_ascii_strncasecmp (str, "mailto:", 7)) + str = (str) + 7; + + if (!*str) + continue; /* if this attenddee is the orgenizer - dont add him/her in some cases there is no maito for email if meeting orginazer */ @@ -756,6 +764,9 @@ e_ews_collect_organizer (icalcomponent *comp) else org_email_address = org; + if (org_email_address && !*org_email_address) + org_email_address = NULL; + return org_email_address; } -- 1.8.3.1