From 0a676910068bc1cbc6038e817941a2aaf629a719 Mon Sep 17 00:00:00 2001 From: dooglus Date: Thu, 8 Mar 2007 01:54:57 +0000 Subject: [PATCH] Really fix 1674142: Correct the change made in r265. We need to process the pending events before deleting the canvas views, not after. This was causing a crash in studio::WorkArea::on_drawing_area_event() when renderer_set_ was found to be populated with null handles. git-svn-id: http://svn.voria.com/code@273 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/gtkmm/instance.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/instance.cpp b/synfig-studio/trunk/src/gtkmm/instance.cpp index 75f6fdf..6c4b6cb 100644 --- a/synfig-studio/trunk/src/gtkmm/instance.cpp +++ b/synfig-studio/trunk/src/gtkmm/instance.cpp @@ -319,11 +319,12 @@ Instance::close() for(std::list >::iterator iter=canvas_view_list().begin();iter!=canvas_view_list().end();iter++) (*iter)->hide(); + // Consume pending events before deleting the canvas views + while(studio::App::events_pending())studio::App::iteration(false); + // Delete all of the canvas views canvas_view_list().clear(); - while(studio::App::events_pending())studio::App::iteration(false); - // If there is another open instance to select, // go ahead and do so. If not, never mind. if(studio::App::instance_list.empty()) -- 2.7.4