aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-cal-model.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@novell.com>2004-09-24 21:54:21 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-09-24 21:54:21 +0800
commit6768cadd8d66cbb219636d844f50c1fedcc8a510 (patch)
tree45b240798945cbd6329068be73a2967050f7f283 /calendar/gui/e-cal-model.c
parent4102ebe1acbc552bdf7ffcc827f25688a7c3e1aa (diff)
downloadgsoc2013-evolution-6768cadd8d66cbb219636d844f50c1fedcc8a510.tar
gsoc2013-evolution-6768cadd8d66cbb219636d844f50c1fedcc8a510.tar.gz
gsoc2013-evolution-6768cadd8d66cbb219636d844f50c1fedcc8a510.tar.bz2
gsoc2013-evolution-6768cadd8d66cbb219636d844f50c1fedcc8a510.tar.lz
gsoc2013-evolution-6768cadd8d66cbb219636d844f50c1fedcc8a510.tar.xz
gsoc2013-evolution-6768cadd8d66cbb219636d844f50c1fedcc8a510.tar.zst
gsoc2013-evolution-6768cadd8d66cbb219636d844f50c1fedcc8a510.zip
Fixes #66344
2004-09-24 JP Rosevear <jpr@novell.com> Fixes #66344 * gui/e-cal-model-calendar.c (get_dtend): check for existence of property and null time instead of sending through bad data * gui/e-cal-model.c (get_dtstart): ditto * gui/e-cal-model-tasks.c (get_completed): ditto (get_due): ditto svn path=/trunk/; revision=27368
Diffstat (limited to 'calendar/gui/e-cal-model.c')
-rw-r--r--calendar/gui/e-cal-model.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index 59530dfee7..87f23b2f45 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -401,10 +401,16 @@ get_dtstart (ECalModel *model, ECalModelComponent *comp_data)
priv = model->priv;
if (!comp_data->dtstart) {
+ icalproperty *prop;
icaltimezone *zone;
gboolean got_zone = FALSE;
- tt_start = icalcomponent_get_dtstart (comp_data->icalcomp);
+ prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DTSTART_PROPERTY);
+ if (!prop)
+ return NULL;
+
+ tt_start = icalproperty_get_dtstart (prop);
+
if (icaltime_get_tzid (tt_start)
&& e_cal_get_timezone (comp_data->client, icaltime_get_tzid (tt_start), &zone, NULL))
got_zone = TRUE;
@@ -417,7 +423,7 @@ get_dtstart (ECalModel *model, ECalModelComponent *comp_data)
tt_start = icaltime_from_timet (comp_data->instance_start, tt_start.is_date);
}
- if (!icaltime_is_valid_time (tt_start))
+ if (!icaltime_is_valid_time (tt_start) || icaltime_is_null_time (tt_start))
return NULL;
comp_data->dtstart = g_new0 (ECellDateEditValue, 1);