mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
Fix duplicate UI initialization
When loading the very first session is canceled (e.g. sample-rate mismatch -> Do not load session) or fails otherwise, execution returns to the startupFSM. Loading another session after that then takes the same path again: StartupFSM::dialog_response_handler() -> StartupFSM::engine_running() -> ARDOUR_UI::attach_to_engine() The call needs to be idempotent, otherwise setup_windows(), create_editor() etc are called a second time and Ardour crashes.
This commit is contained in:
parent
fc54e9c583
commit
7408a9958e
1 changed files with 5 additions and 0 deletions
|
|
@ -593,8 +593,13 @@ ARDOUR_UI::create_global_port_matrix (ARDOUR::DataType type)
|
|||
void
|
||||
ARDOUR_UI::attach_to_engine ()
|
||||
{
|
||||
static bool first_time = true;
|
||||
if (!first_time) {
|
||||
return;
|
||||
}
|
||||
AudioEngine::instance()->Running.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::engine_running, this, _1), gui_context());
|
||||
engine_running (0);
|
||||
first_time = false;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue