diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index e38009ed88..9aef4fc76a 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -1066,10 +1066,6 @@ If you still wish to quit, please use the\n\n\ fps_connection.disconnect(); } - delete ARDOUR_UI::instance()->video_timeline; - ARDOUR_UI::instance()->video_timeline = NULL; - stop_video_server(); - /* Save state before deleting the session, as that causes some windows to be destroyed before their visible state can be saved. @@ -1084,8 +1080,15 @@ If you still wish to quit, please use the\n\n\ if (_session) { - if (delete_unnamed_session) { + + /* This may run a recursive dialog, which will allow + * for the GTK idle handler to do things. Not a problem + * in itself, but something to keep in mind since it + * isn't visually apparent that this will allow a + * recursive main loop to execute. + */ + ask_about_scratch_deletion (); } @@ -1095,6 +1098,10 @@ If you still wish to quit, please use the\n\n\ } + delete ARDOUR_UI::instance()->video_timeline; + ARDOUR_UI::instance()->video_timeline = NULL; + stop_video_server(); + halt_connection.disconnect (); AudioEngine::instance()->stop (); quit ();