aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/ea-cal-view-event.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-05-14 05:49:58 +0800
committerMilan Crha <mcrha@redhat.com>2010-05-14 05:49:58 +0800
commit5a124a6add633ba4af8babc8de7a8a9b8058899e (patch)
tree9fd9c187c4ac640eeb10c8586c90c3b9c5ec7380 /calendar/gui/ea-cal-view-event.c
parentb936a2301feb69f420d930f8f74436dde35b9f04 (diff)
downloadgsoc2013-evolution-5a124a6add633ba4af8babc8de7a8a9b8058899e.tar.gz
gsoc2013-evolution-5a124a6add633ba4af8babc8de7a8a9b8058899e.tar.zst
gsoc2013-evolution-5a124a6add633ba4af8babc8de7a8a9b8058899e.zip
Bug #607257 - Add checks for event->comp_data != NULL
Diffstat (limited to 'calendar/gui/ea-cal-view-event.c')
-rw-r--r--calendar/gui/ea-cal-view-event.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/calendar/gui/ea-cal-view-event.c b/calendar/gui/ea-cal-view-event.c
index 5b4bcc7e1b..b2bdc5c4b3 100644
--- a/calendar/gui/ea-cal-view-event.c
+++ b/calendar/gui/ea-cal-view-event.c
@@ -198,9 +198,17 @@ ea_cal_view_event_new (GObject *obj)
&event_num,
&span_num))
return NULL;
+
+ if (!is_array_index_in_bounds (week_view->events, event_num))
+ return NULL;
+
week_view_event = &g_array_index (week_view->events,
EWeekViewEvent,
event_num);
+
+ if (!is_array_index_in_bounds (week_view->spans, week_view_event->spans_index))
+ return NULL;
+
/* get the first span */
event_span = &g_array_index (week_view->spans,
EWeekViewEventSpan,
@@ -269,6 +277,8 @@ ea_cal_view_event_get_name (AtkObject *accessible)
if (!g_obj || !E_IS_TEXT (g_obj))
return NULL;
event = ea_calendar_helpers_get_cal_view_event_from (GNOME_CANVAS_ITEM(g_obj));
+ if (!is_comp_data_valid (event))
+ return NULL;
alarm_string = recur_string = meeting_string = "";
if (event && event->comp_data) {