From c6566f39337be483241843dd8f471a023f8f15d4 Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Thu, 30 Jun 2022 16:47:17 -0500 Subject: [PATCH] mackie protocol: add more null checks; remove some debug msgs --- libs/surfaces/mackie/strip.cc | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/libs/surfaces/mackie/strip.cc b/libs/surfaces/mackie/strip.cc index 7bf6f88d35..0085d33614 100644 --- a/libs/surfaces/mackie/strip.cc +++ b/libs/surfaces/mackie/strip.cc @@ -156,10 +156,7 @@ Strip::add (Control & control) /* fader, vpot, meter were all set explicitly */ -std::cout << "Strip::add adding control: " << control.name(); - if ((button = dynamic_cast(&control)) != 0) { -std::cout << "; button name: " << Button::id_to_name (button->bid()); switch (button->bid()) { case Button::RecEnable: _recenable = button; @@ -184,7 +181,6 @@ std::cout << "; button name: " << Button::id_to_name (button->bid()); } } - std::cout << std::endl; } void @@ -201,8 +197,6 @@ Strip::set_stripable (boost::shared_ptr r, bool /*with_messages*/) _fader->set_control (boost::shared_ptr()); _vpot->set_control (boost::shared_ptr()); -std::cout << "Strip::set_stripable initializing buttons" << std::endl; - if (_select) { _select->set_control (boost::shared_ptr()); } @@ -216,8 +210,6 @@ std::cout << "Strip::set_stripable initializing buttons" << std::endl; _recenable->set_control (boost::shared_ptr()); } -std::cout << "Strip::set_stripable initializing buttons DONE" << std::endl; - _stripable = r; reset_saved_values (); @@ -238,8 +230,6 @@ std::cout << "Strip::set_stripable initializing buttons DONE" << std::endl; _mute->set_control (_stripable->mute_control()); } -std::cout << "Strip::set_stripable assigning mute+solo DONE" << std::endl; - _stripable->solo_control()->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_solo_changed, this), ui_context()); _stripable->mute_control()->Changed.connect(stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_mute_changed, this), ui_context()); @@ -295,7 +285,6 @@ std::cout << "Strip::set_stripable assigning mute+solo DONE" << std::endl; set_vpot_parameter (_pan_mode); } -std::cout << "Strip::set_stripable assigning fader" << std::endl; if (_fader) { _fader->set_control (_stripable->gain_control()); } @@ -424,7 +413,7 @@ Strip::notify_property_changed (const PropertyChange& what_changed) show_stripable_name (); } - if (what_changed.contains (ARDOUR::Properties::selected)) { + if (_select && what_changed.contains (ARDOUR::Properties::selected)) { _surface->write (_select->set_state (_stripable->is_selected())); } } @@ -432,7 +421,7 @@ Strip::notify_property_changed (const PropertyChange& what_changed) void Strip::update_selection_state () { - if(_stripable) { + if(_select && _stripable) { _surface->write (_select->set_state (_stripable->is_selected())); } }