aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/importers
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/importers')
-rw-r--r--calendar/importers/icalendar-importer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/calendar/importers/icalendar-importer.c b/calendar/importers/icalendar-importer.c
index 1eeeb95aef..70906e1578 100644
--- a/calendar/importers/icalendar-importer.c
+++ b/calendar/importers/icalendar-importer.c
@@ -137,11 +137,15 @@ prepare_events (icalcomponent *icalcomp)
if (child_kind != ICAL_VEVENT_COMPONENT
&& child_kind != ICAL_VTIMEZONE_COMPONENT) {
+ icalcompiter_next (&iter);
+
icalcomponent_remove_component (icalcomp, subcomp);
if (child_kind == ICAL_VTODO_COMPONENT)
vtodos = g_list_prepend (vtodos, subcomp);
else
icalcomponent_free (subcomp);
+
+ continue;
}
icalcompiter_next (&iter);
@@ -166,8 +170,11 @@ prepare_tasks (icalcomponent *icalcomp, GList *vtodos)
icalcomponent_kind child_kind = icalcomponent_isa (subcomp);
if (child_kind != ICAL_VTODO_COMPONENT
&& child_kind != ICAL_VTIMEZONE_COMPONENT) {
+ icalcompiter_next (&iter);
icalcomponent_remove_component (icalcomp, subcomp);
icalcomponent_free (subcomp);
+
+ continue;
}
icalcompiter_next (&iter);