aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog8
-rw-r--r--calendar/importers/icalendar-importer.c7
2 files changed, 15 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 6906c37fac..9eddd98c12 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,11 @@
+2003-11-19 Rodrigo Moya <rodrigo@ximian.com>
+
+ Fixes #51052
+
+ * importers/icalendar-importer.c (prepare_events, prepare_tasks):
+ call icalcompiter_next to move the pointer to the next before
+ removing a component avoid breaking the link.
+
2003-11-18 JP Rosevear <jpr@ximian.com>
* gui/e-cal-model.c (get_dtstart): make sure the timezone value is
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);