aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2004-05-12 00:59:56 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2004-05-12 00:59:56 +0800
commit580bd2fee1afd6c4528cae55249aa2eb72e9cdba (patch)
tree2dc22e689ed307fa4ca4d906534f7a9b709aafc8 /calendar/gui
parent4a06c4e5e314629911a99e875194d1e72ff74bc5 (diff)
downloadgsoc2013-evolution-580bd2fee1afd6c4528cae55249aa2eb72e9cdba.tar.gz
gsoc2013-evolution-580bd2fee1afd6c4528cae55249aa2eb72e9cdba.tar.zst
gsoc2013-evolution-580bd2fee1afd6c4528cae55249aa2eb72e9cdba.zip
Fixes #53137
2004-05-11 Rodrigo Moya <rodrigo@ximian.com> Fixes #53137 * gui/dialogs/schedule-page.c (schedule_page_fill_widgets): check dates from the ECalComponent before using them. svn path=/trunk/; revision=25855
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/dialogs/schedule-page.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c
index 97126f7bbd..d9f37b414f 100644
--- a/calendar/gui/dialogs/schedule-page.c
+++ b/calendar/gui/dialogs/schedule-page.c
@@ -204,7 +204,7 @@ update_time (SchedulePage *spage, ECalComponentDateTime *start_date, ECalCompone
gboolean all_day;
priv = spage->priv;
-
+
/* Note that if we are creating a new event, the timezones may not be
on the server, so we try to get the builtin timezone with the TZID
first. */
@@ -284,6 +284,7 @@ schedule_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
SchedulePage *spage;
SchedulePagePrivate *priv;
ECalComponentDateTime start_date, end_date;
+ gboolean validated = TRUE;
spage = SCHEDULE_PAGE (page);
priv = spage->priv;
@@ -296,14 +297,19 @@ schedule_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
/* Start and end times */
e_cal_component_get_dtstart (comp, &start_date);
e_cal_component_get_dtend (comp, &end_date);
- update_time (spage, &start_date, &end_date);
+ if (!start_date.value)
+ validated = FALSE;
+ else if (!end_date.value)
+ validated = FALSE;
+ else
+ update_time (spage, &start_date, &end_date);
e_cal_component_free_datetime (&start_date);
e_cal_component_free_datetime (&end_date);
priv->updating = FALSE;
- return TRUE;
+ return validated;
}
/* fill_component handler for the schedule page */