aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gui/e-week-view.c9
2 files changed, 12 insertions, 4 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 834c9dd696..bc7cd6d853 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,10 @@
+2006-07-11 Li Yuan <li.yuan@sun.com>
+
+ * 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.
+
2006-07-11 Li Yuan <li.yuan@sun.com>
* gui/dialogs/event-page.c: (sensitize_widgets):
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;