aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-cal-model-calendar.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-calendar.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-calendar.c')
-rw-r--r--calendar/gui/e-cal-model-calendar.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/calendar/gui/e-cal-model-calendar.c b/calendar/gui/e-cal-model-calendar.c
index 479f51fbd6..63532c5be8 100644
--- a/calendar/gui/e-cal-model-calendar.c
+++ b/calendar/gui/e-cal-model-calendar.c
@@ -112,20 +112,26 @@ ecmc_column_count (ETableModel *etm)
}
static ECellDateEditValue *
-get_dtend (ECalModel *model, ECalModelComponent *comp_data)
+get_dtend (ECalModelCalendar *model, ECalModelComponent *comp_data)
{
struct icaltimetype tt_end;
if (!comp_data->dtend) {
+ icalproperty *prop;
icaltimezone *zone;
gboolean got_zone = FALSE;
- tt_end = icalcomponent_get_dtend (comp_data->icalcomp);
+ prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DTEND_PROPERTY);
+ if (!prop)
+ return NULL;
+
+ tt_end = icalproperty_get_dtend (prop);
+
if (icaltime_get_tzid (tt_end)
&& e_cal_get_timezone (comp_data->client, icaltime_get_tzid (tt_end), &zone, NULL))
got_zone = TRUE;
- if ((e_cal_model_get_flags (model) & E_CAL_MODEL_FLAGS_EXPAND_RECURRENCES) &&
+ if ((e_cal_model_get_flags (E_CAL_MODEL (model)) & E_CAL_MODEL_FLAGS_EXPAND_RECURRENCES) &&
(e_cal_util_component_has_recurrences (comp_data->icalcomp))) {
if (got_zone)
tt_end = icaltime_from_timet_with_zone (comp_data->instance_end, tt_end.is_date, zone);
@@ -133,7 +139,7 @@ get_dtend (ECalModel *model, ECalModelComponent *comp_data)
tt_end = icaltime_from_timet (comp_data->instance_end, tt_end.is_date);
}
- if (!icaltime_is_valid_time (tt_end))
+ if (!icaltime_is_valid_time (tt_end) || icaltime_is_null_time (tt_end))
return NULL;
comp_data->dtend = g_new0 (ECellDateEditValue, 1);