aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorLi Yuan <li.yuan@sun.com>2006-07-11 19:54:45 +0800
committerLi Yuan <liyuan@src.gnome.org>2006-07-11 19:54:45 +0800
commit0a441d94cf8cfeb8fdbeeeac210669163528a998 (patch)
treedbdb37a17342ca06df2c6c9a4bf0bed015bcd7a5 /calendar/gui
parentfb9d4cd392fcd410885f32ece0d7e8c7cb5d5b63 (diff)
downloadgsoc2013-evolution-0a441d94cf8cfeb8fdbeeeac210669163528a998.tar
gsoc2013-evolution-0a441d94cf8cfeb8fdbeeeac210669163528a998.tar.gz
gsoc2013-evolution-0a441d94cf8cfeb8fdbeeeac210669163528a998.tar.bz2
gsoc2013-evolution-0a441d94cf8cfeb8fdbeeeac210669163528a998.tar.lz
gsoc2013-evolution-0a441d94cf8cfeb8fdbeeeac210669163528a998.tar.xz
gsoc2013-evolution-0a441d94cf8cfeb8fdbeeeac210669163528a998.tar.zst
gsoc2013-evolution-0a441d94cf8cfeb8fdbeeeac210669163528a998.zip
remove week_view->comp_data first, since garray is not thread safe and the
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. svn path=/trunk/; revision=32281
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/e-week-view.c9
1 files changed, 5 insertions, 4 deletions
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;