From e94771a58fcab23c1c5e3c0bf6a191a66e4e06e1 Mon Sep 17 00:00:00 2001 From: Len Ovens Date: Sun, 30 Jul 2017 18:34:56 -0700 Subject: OSC: fix VCAs try to connect to controls it does not have. --- libs/surfaces/osc/osc_route_observer.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'libs/surfaces') diff --git a/libs/surfaces/osc/osc_route_observer.cc b/libs/surfaces/osc/osc_route_observer.cc index 550fd396a0..656c6f086e 100644 --- a/libs/surfaces/osc/osc_route_observer.cc +++ b/libs/surfaces/osc/osc_route_observer.cc @@ -61,11 +61,15 @@ OSCRouteObserver::OSCRouteObserver (boost::shared_ptr s, uint32_t ss, _strip->solo_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/solo"), _strip->solo_control()), OSC::instance()); send_change_message ("/strip/solo", _strip->solo_control()); - _strip->solo_isolate_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, bind (&OSCRouteObserver::send_change_message, this, X_("/strip/solo_iso"), _strip->solo_isolate_control()), OSC::instance()); - send_change_message ("/strip/solo_iso", _strip->solo_isolate_control()); + if (_strip->solo_isolate_control()) { + _strip->solo_isolate_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, bind (&OSCRouteObserver::send_change_message, this, X_("/strip/solo_iso"), _strip->solo_isolate_control()), OSC::instance()); + send_change_message ("/strip/solo_iso", _strip->solo_isolate_control()); + } - _strip->solo_safe_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, bind (&OSCRouteObserver::send_change_message, this, X_("/strip/solo_safe"), _strip->solo_safe_control()), OSC::instance()); - send_change_message ("/strip/solo_safe", _strip->solo_safe_control()); + if (_strip->solo_safe_control()) { + _strip->solo_safe_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, bind (&OSCRouteObserver::send_change_message, this, X_("/strip/solo_safe"), _strip->solo_safe_control()), OSC::instance()); + send_change_message ("/strip/solo_safe", _strip->solo_safe_control()); + } boost::shared_ptr track = boost::dynamic_pointer_cast (_strip); if (track) { -- cgit v1.2.3