diff options
author | Li Yuan <li.yuan@sun.com> | 2006-07-11 19:54:45 +0800 |
---|---|---|
committer | Li Yuan <liyuan@src.gnome.org> | 2006-07-11 19:54:45 +0800 |
commit | 0a441d94cf8cfeb8fdbeeeac210669163528a998 (patch) | |
tree | dbdb37a17342ca06df2c6c9a4bf0bed015bcd7a5 /calendar | |
parent | fb9d4cd392fcd410885f32ece0d7e8c7cb5d5b63 (diff) | |
download | gsoc2013-evolution-0a441d94cf8cfeb8fdbeeeac210669163528a998.tar.gz 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')
-rw-r--r-- | calendar/ChangeLog | 7 | ||||
-rw-r--r-- | calendar/gui/e-week-view.c | 9 |
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; |