aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-week-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/e-week-view.c')
-rw-r--r--calendar/gui/e-week-view.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 6b75b409ba..0665a6e63d 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -1136,11 +1136,11 @@ e_week_view_remove_event_cb (EWeekView *week_view,
event = &g_array_index (week_view->events, EWeekViewEvent, event_num);
- /* We set the event's uid to NULL so we don't try to update it in
- on_editing_stopped(). */
- g_free (event->ico->uid);
- event->ico->uid = NULL;
-
+ /* If we were editing this event, set editing_event_num to -1 so
+ on_editing_stopped doesn't try to update the event. */
+ if (week_view->editing_event_num == event_num)
+ week_view->editing_event_num = -1;
+
/* We leave the span elements in the array, but set the canvas item
pointers to NULL. */
for (span_num = 0; span_num < event->num_spans; span_num++) {