From 66bd1950301d6e2a8eb16d138fcb38f527091049 Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Thu, 30 Jun 2022 11:30:03 -0500 Subject: [PATCH] mackie protocol: potential crash-fix --- libs/surfaces/mackie/strip.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/surfaces/mackie/strip.cc b/libs/surfaces/mackie/strip.cc index d3112a3561..3b13bc9302 100644 --- a/libs/surfaces/mackie/strip.cc +++ b/libs/surfaces/mackie/strip.cc @@ -196,9 +196,11 @@ Strip::set_stripable (boost::shared_ptr r, bool /*with_messages*/) _solo->set_control (boost::shared_ptr()); _mute->set_control (boost::shared_ptr()); _select->set_control (boost::shared_ptr()); - _recenable->set_control (boost::shared_ptr()); _fader->set_control (boost::shared_ptr()); _vpot->set_control (boost::shared_ptr()); + if (_recenable) { + _recenable->set_control (boost::shared_ptr()); + } _stripable = r; @@ -235,7 +237,7 @@ Strip::set_stripable (boost::shared_ptr r, bool /*with_messages*/) boost::shared_ptr rec_enable_control = _stripable->rec_enable_control (); - if (rec_enable_control) { + if (_recenable && rec_enable_control) { _recenable->set_control (rec_enable_control); rec_enable_control->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_record_enable_changed, this), ui_context()); }