diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-01-27 19:05:47 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-01-27 19:05:47 -0500 |
commit | 420206705d10544ce4d9edceedf14a0870cf4f6c (patch) | |
tree | 620240cf3178dfb6cece06f72e5e1212e9e300c0 /libs | |
parent | e63c805fe2000b31207598c3c43b6bb6b383b0a5 (diff) |
mackie: fix subview mode logic
Diffstat (limited to 'libs')
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index a6ac44b2ba..41aae847a8 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -1627,31 +1627,25 @@ MackieControlProtocol::notify_subview_route_deleted () bool MackieControlProtocol::subview_mode_would_be_ok (SubViewMode mode, boost::shared_ptr<Route> r) { - - if (!r) { - /* no selected track? no subview mode */ - return false; - } - switch (mode) { case None: return true; break; case Sends: - if (r->send_level_controllable (0)) { + if (r && r->send_level_controllable (0)) { return true; } break; case EQ: - if (r->eq_band_cnt() > 0) { + if (r && r->eq_band_cnt() > 0) { return true; } break; case Dynamics: - if (r->comp_enable_controllable()) { + if (r && r->comp_enable_controllable()) { return true; } break; |