diff options
Diffstat (limited to 'calendar/gui/e-week-view.c')
-rw-r--r-- | calendar/gui/e-week-view.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index d3573db107..4a5aceb86f 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -1021,15 +1021,19 @@ e_week_view_focus (GtkWidget *widget, GtkDirectionType direction) static GList * e_week_view_get_selected_events (ECalView *cal_view) { - EWeekViewEvent *event; + EWeekViewEvent *event = NULL; GList *list = NULL; EWeekView *week_view = (EWeekView *) cal_view; g_return_val_if_fail (E_IS_WEEK_VIEW (week_view), NULL); - g_return_val_if_fail (week_view->editing_event_num != -1, NULL); - event = &g_array_index (week_view->events, EWeekViewEvent, - week_view->editing_event_num); + if (week_view->editing_event_num != -1) { + event = &g_array_index (week_view->events, EWeekViewEvent, + week_view->editing_event_num); + } else if (week_view->popup_event_num != -1) { + event = &g_array_index (week_view->events, EWeekViewEvent, + week_view->popup_event_num); + } if (event) list = g_list_prepend (list, event->comp); |