From 0a441d94cf8cfeb8fdbeeeac210669163528a998 Mon Sep 17 00:00:00 2001 From: Li Yuan Date: Tue, 11 Jul 2006 11:54:45 +0000 Subject: remove week_view->comp_data first, since garray is not thread safe and the 2006-07-11 Li Yuan * gui/e-week-view.c: (e_week_view_remove_event_cb): remove week_view->comp_data first, since garray is not thread safe and the event's address may be changed. Fix for #345969. svn path=/trunk/; revision=32281 --- calendar/gui/e-week-view.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'calendar/gui') diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 6d86eb6c6f..83c5821a71 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -1916,6 +1916,11 @@ e_week_view_remove_event_cb (EWeekView *week_view, if (week_view->popup_event_num == event_num) week_view->popup_event_num = -1; + e_cal_model_free_component_data (event->comp_data); + event->comp_data = NULL; + + g_array_remove_index (week_view->events, event_num); + /* 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++) { @@ -1932,10 +1937,6 @@ e_week_view_remove_event_cb (EWeekView *week_view, } } - e_cal_model_free_component_data (event->comp_data); - event->comp_data = NULL; - - g_array_remove_index (week_view->events, event_num); week_view->events_need_layout = TRUE; return TRUE; -- cgit v1.2.3