diff options
author | Milan Crha <mcrha@redhat.com> | 2010-05-14 05:49:58 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2010-05-14 05:49:58 +0800 |
commit | 5a124a6add633ba4af8babc8de7a8a9b8058899e (patch) | |
tree | 9fd9c187c4ac640eeb10c8586c90c3b9c5ec7380 /calendar/gui/e-day-view-top-item.c | |
parent | b936a2301feb69f420d930f8f74436dde35b9f04 (diff) | |
download | gsoc2013-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/e-day-view-top-item.c')
-rw-r--r-- | calendar/gui/e-day-view-top-item.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c index c4d30d6e8f..f622b8252b 100644 --- a/calendar/gui/e-day-view-top-item.c +++ b/calendar/gui/e-day-view-top-item.c @@ -93,8 +93,15 @@ day_view_top_item_draw_triangle (EDayViewTopItem *top_item, if (h % 2 == 0) c1--; + if (!is_array_index_in_bounds (day_view->long_events, event_num)) + return; + event = &g_array_index (day_view->long_events, EDayViewEvent, event_num); + + if (!is_comp_data_valid (event)) + return; + cairo_save (cr); /* Fill it in. */ if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)), @@ -187,9 +194,15 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item, &item_w, &item_h)) return; + if (!is_array_index_in_bounds (day_view->long_events, event_num)) + return; + event = &g_array_index (day_view->long_events, EDayViewEvent, event_num); + if (!is_comp_data_valid (event)) + return; + style = gtk_widget_get_style (GTK_WIDGET (day_view)); gc = day_view->main_gc; fg_gc = style->fg_gc[GTK_STATE_NORMAL]; |