If the calendar contained any attendees _not_ prefixed with ‘mailto:’,
the text variable would be NULL, and would cause an assertion failure in
g_strstrip().
Found by scan-build.
https://bugzilla.gnome.org/719533
prop != NULL;
prop = icalcomponent_get_next_property (icalcomp, ICAL_ATTENDEE_PROPERTY)) {
gchar *attendee;
- gchar *text = NULL;
+ gchar *text;
attendee = icalproperty_get_value_as_string_r (prop);
if (!attendee)
if (!g_ascii_strncasecmp (attendee, "mailto:", 7))
text = g_strdup (attendee + 7);
+ else
+ text = g_strdup (attendee);
+
text = g_strstrip (text);
if (!g_ascii_strcasecmp (email, text)) {