Fix ctrl surface shutdown sequence

Tear down GUI before stopping event loop, this fixes
a crash on windows (and perhaps a rare crash on other OS).
This commit is contained in:
Robin Gareus 2024-07-11 19:19:21 +02:00
parent 676b372ac5
commit fa6fbbf810
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
5 changed files with 8 additions and 6 deletions

View file

@ -167,7 +167,6 @@ GenericMidiControlProtocol::~GenericMidiControlProtocol ()
}
drop_all ();
tear_down_gui ();
}
list<std::shared_ptr<ARDOUR::Bundle> >
@ -300,6 +299,7 @@ GenericMidiControlProtocol::do_request (GenericMIDIRequest* req)
int
GenericMidiControlProtocol::stop ()
{
tear_down_gui ();
BaseUI::quit ();
return 0;
@ -328,6 +328,7 @@ GenericMidiControlProtocol::set_active (bool yn)
if (yn) {
BaseUI::run ();
} else {
tear_down_gui ();
BaseUI::quit ();
}