From 1d61a3e17fd7c13b9fb23a3e21d9545565eb3993 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 12 Jul 2018 21:43:49 +0200 Subject: [PATCH] CC121: cycle track monitoring states --- libs/surfaces/cc121/operations.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libs/surfaces/cc121/operations.cc b/libs/surfaces/cc121/operations.cc index f66f4fd2c8..a23adf2c70 100644 --- a/libs/surfaces/cc121/operations.cc +++ b/libs/surfaces/cc121/operations.cc @@ -45,24 +45,20 @@ static const double encoder_divider = 24.0; void CC121::input_monitor () { - if (_current_stripable) { + if (_current_stripable && _current_stripable->monitoring_control()) { MonitorChoice choice = _current_stripable->monitoring_control()->monitoring_choice (); switch(choice) { case MonitorAuto: _current_stripable->monitoring_control()->set_value (MonitorInput, PBD::Controllable::NoGroup); - get_button(InputMonitor).set_led_state (_output_port, true); break; case MonitorInput: _current_stripable->monitoring_control()->set_value (MonitorDisk, PBD::Controllable::NoGroup); - get_button(InputMonitor).set_led_state (_output_port, false); break; case MonitorDisk: _current_stripable->monitoring_control()->set_value (MonitorCue, PBD::Controllable::NoGroup); - get_button(InputMonitor).set_led_state (_output_port, false); break; case MonitorCue: - _current_stripable->monitoring_control()->set_value (MonitorInput, PBD::Controllable::NoGroup); - get_button(InputMonitor).set_led_state (_output_port, true); + _current_stripable->monitoring_control()->set_value (MonitorAuto, PBD::Controllable::NoGroup); break; default: break;