aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/importers/icalendar-importer.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2003-11-19 19:43:42 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2003-11-19 19:43:42 +0800
commit9b6a235208a55d52a3beef416100b4498f0e174e (patch)
tree4c12e86bae60f20fdb4ba9ea4c3f0e0d7e994dd4 /calendar/importers/icalendar-importer.c
parent9130b26c7b84ea9d96bb9d77f819a4c6fe099eda (diff)
downloadgsoc2013-evolution-9b6a235208a55d52a3beef416100b4498f0e174e.tar.gz
gsoc2013-evolution-9b6a235208a55d52a3beef416100b4498f0e174e.tar.zst
gsoc2013-evolution-9b6a235208a55d52a3beef416100b4498f0e174e.zip
Fixes #51052
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. svn path=/trunk/; revision=23441
Diffstat (limited to 'calendar/importers/icalendar-importer.c')
-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);