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:
parent
676b372ac5
commit
fa6fbbf810
@ -61,11 +61,11 @@ Console1::~Console1 ()
|
||||
{
|
||||
all_lights_out ();
|
||||
|
||||
tear_down_gui ();
|
||||
|
||||
stop_event_loop ();
|
||||
MIDISurface::drop ();
|
||||
|
||||
tear_down_gui ();
|
||||
|
||||
for (const auto& b : buttons) {
|
||||
delete b.second;
|
||||
}
|
||||
|
@ -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 ();
|
||||
}
|
||||
|
||||
|
@ -189,8 +189,8 @@ LaunchPadPro::~LaunchPadPro ()
|
||||
p.second.timeout_connection.disconnect ();
|
||||
}
|
||||
|
||||
stop_event_loop ();
|
||||
tear_down_gui ();
|
||||
stop_event_loop ();
|
||||
|
||||
MIDISurface::drop ();
|
||||
|
||||
|
@ -193,8 +193,8 @@ LaunchPadX::~LaunchPadX ()
|
||||
p.second.timeout_connection.disconnect ();
|
||||
}
|
||||
|
||||
stop_event_loop ();
|
||||
tear_down_gui ();
|
||||
stop_event_loop ();
|
||||
|
||||
MIDISurface::drop ();
|
||||
|
||||
|
@ -138,7 +138,6 @@ OSC::~OSC()
|
||||
{
|
||||
tick = false;
|
||||
stop ();
|
||||
tear_down_gui ();
|
||||
_instance = 0;
|
||||
}
|
||||
|
||||
@ -315,6 +314,8 @@ OSC::thread_init ()
|
||||
int
|
||||
OSC::stop ()
|
||||
{
|
||||
tear_down_gui ();
|
||||
|
||||
periodic_connection.disconnect ();
|
||||
session_connections.drop_connections ();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user