mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
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:
parent
650fd31332
commit
cda2e004a8
2 changed files with 16 additions and 6 deletions
|
|
@ -471,10 +471,11 @@ ARDOUR_UI::sfsm_response (StartupFSM::Result r)
|
|||
case StartupFSM::LoadSession:
|
||||
|
||||
if (load_session_from_startup_fsm () == 0) {
|
||||
startup_done ();
|
||||
delete startup_fsm;
|
||||
startup_fsm = 0;
|
||||
startup_done ();
|
||||
} else {
|
||||
DEBUG_TRACE (DEBUG::GuiStartup, "FSM reset\n");
|
||||
startup_fsm->reset ();
|
||||
}
|
||||
|
||||
|
|
@ -519,6 +520,16 @@ ARDOUR_UI::starting ()
|
|||
startup_fsm = new StartupFSM (*amd);
|
||||
startup_fsm->signal_response().connect (sigc::mem_fun (*this, &ARDOUR_UI::sfsm_response));
|
||||
|
||||
|
||||
/* allow signals to be handled, ShouldLoad() from flush-pending */
|
||||
Splash::instance()->pop_front();
|
||||
flush_pending ();
|
||||
|
||||
if (!startup_fsm) {
|
||||
DEBUG_TRACE (DEBUG::GuiStartup, "Starting: SFSM was driven by flush-pending\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Note: entire startup process could happen in this one call
|
||||
* if:
|
||||
*
|
||||
|
|
@ -788,6 +799,7 @@ ARDOUR_UI::load_from_application_api (const std::string& path)
|
|||
* 3) no audio/MIDI setup required
|
||||
*/
|
||||
|
||||
Splash::instance()->pop_front();
|
||||
startup_fsm->start ();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue