From 454b33095087b080f875dba4bcb7689b991f5550 Mon Sep 17 00:00:00 2001 From: Todd Naugle Date: Tue, 3 Aug 2021 16:11:25 -0500 Subject: [PATCH] Mackie Control: Hold the surfaces lock while resetting the master_surface --- libs/surfaces/mackie/mackie_control_protocol.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index 0739f037d9..7a48cf8fd0 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -873,10 +873,6 @@ MackieControlProtocol::create_surfaces () return -1; } - if (is_master) { - _master_surface = surface; - } - if (configuration_state) { XMLNode* this_device = 0; XMLNodeList const& devices = configuration_state->children(); @@ -897,6 +893,9 @@ MackieControlProtocol::create_surfaces () { Glib::Threads::Mutex::Lock lm (surfaces_lock); + if (is_master) { + _master_surface = surface; + } surfaces.push_back (surface); }