From baf307838c0d7d71a8a1428391ce958fee1c577d Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 4 May 2023 12:34:37 -0600 Subject: [PATCH] push2: change ordering within destructor to avoid event loop thread drawing-after-delete --- libs/surfaces/push2/push2.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libs/surfaces/push2/push2.cc b/libs/surfaces/push2/push2.cc index 1ea1fe33b8..e9fa2784cc 100644 --- a/libs/surfaces/push2/push2.cc +++ b/libs/surfaces/push2/push2.cc @@ -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 () {