13
0

Add a couple of function calls so that Ardour will perform some basic cleanup when the user exits

Up until now we were relying on various d'tors to do this cleanup for us. However, because we were calling 'exit()' (to terminate the program) those d'tors were never getting called. We should probably review the use of exit() as a termination strategy.
This commit is contained in:
John Emmas 2014-07-15 13:19:33 +01:00
parent de218360d0
commit 74ec58c12e

View File

@ -53,6 +53,7 @@
#include "pbd/stl_delete.h"
#include "pbd/file_utils.h"
#include "pbd/localtime_r.h"
#include "pbd/pthread_utils.h"
#include "gtkmm2ext/application.h"
#include "gtkmm2ext/bindings.h"
@ -2718,6 +2719,13 @@ ARDOUR_UI::get_session_parameters (bool quit_on_cancel, bool should_be_new, stri
break;
default:
if (quit_on_cancel) {
// JE - Currently (July 2014) this section can only get reached if the
// user quits from the main 'Session Setup' dialog (i.e. reaching this
// point does NOT indicate an abnormal termination). Therefore, let's
// behave gracefully (i.e. let's do some cleanup) before we call exit()
ARDOUR::cleanup ();
pthread_cancel_all ();
exit (1);
} else {
return ret;