push2: change ordering within destructor to avoid event loop thread drawing-after-delete

This commit is contained in:
Paul Davis 2023-05-04 12:34:37 -06:00
parent 617caf9e98
commit baf307838c
1 changed files with 2 additions and 3 deletions

View File

@ -192,6 +192,8 @@ Push2::~Push2 ()
{
DEBUG_TRACE (DEBUG::Push2, "push2 control surface object being destroyed\n");
stop_event_loop ();
MIDISurface::drop ();
if (_current_layout) {
@ -209,11 +211,8 @@ Push2::~Push2 ()
_track_mix_layout = 0;
delete _cue_layout;
_cue_layout = 0;
stop_event_loop ();
}
void
Push2::run_event_loop ()
{