Fix opening sessions using the Finder (OSX)

The ShouldLoad() signal is handled by flush_pending(). This is the first
time that normal application flow can be interrupted in ::starting()
after app->ready().

This calls ::load_from_application_api(), which in turn calls
startup_fsm->handle_path(). This sets off the complete initalization
process, loading the session, and concludes with ::sfsm_response(),
where there is a call to `delete startup_fsm;`

Previously execution continued in StartupFSM::start() which caused a
crash.
This commit is contained in:
Robin Gareus 2020-06-12 22:08:04 +02:00
parent 650fd31332
commit cda2e004a8
2 changed files with 16 additions and 6 deletions

View file

@ -127,11 +127,6 @@ StartupFSM::queue_finish ()
void
StartupFSM::start ()
{
/* get the splash screen visible, if it isn't yet */
Splash::instance()->pop_front();
/* make it all happen on-screen */
ARDOUR_UI::instance()->flush_pending ();
DEBUG_TRACE (DEBUG::GuiStartup, string_compose (X_("State at startup: %1\n"), enum_2_string (_state)));
switch (_state) {
@ -144,6 +139,9 @@ StartupFSM::start ()
case WaitingForSessionPath:
handle_waiting_for_session_path ();
break;
case WaitingForEngineParams:
start_audio_midi_setup ();
break;
default:
fatal << string_compose (_("Programming error: %1"), string_compose (X_("impossible starting state in StartupFSM (%1)"), enum_2_string (_state))) << endmsg;
std::cerr << string_compose (_("Programming error: %1"), string_compose (X_("impossible starting state in StartupFSM (%1)"), enum_2_string (_state))) << std::endl;