Convert the rest of the error and warning dialogs to Gtk::MessageDialog since it...
[synfig.git] / synfig-studio / trunk / src / gtkmm / instance.cpp
index 42a6ec8..6c4b6cb 100644 (file)
@@ -319,6 +319,9 @@ Instance::close()
        for(std::list<etl::handle<CanvasView> >::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();
 
@@ -634,8 +637,6 @@ Instance::safe_close()
        
        close();
 
-       while(studio::App::events_pending())studio::App::iteration(false);
-
        return true;
 }