diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-22 02:15:24 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-22 02:15:24 +0000 |
commit | 82c867bf2a6f4de102707b812a87d68e3bd6e170 (patch) | |
tree | 157488dbc4def6614f2f01792a32a20af5ede167 /libs/surfaces/mackie/controls.cc | |
parent | ca96b9afe85018fac3e5097f7b211a544d7689a9 (diff) |
MCP: a fistful of improvements. probably best to just try it and see what it broken. KNOWN: pressing vpots without a bank/channel shift will crash ardour
git-svn-id: svn://localhost/ardour2/branches/3.0@12053 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/surfaces/mackie/controls.cc')
-rw-r--r-- | libs/surfaces/mackie/controls.cc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/libs/surfaces/mackie/controls.cc b/libs/surfaces/mackie/controls.cc index 29d8d165ce..e5b8a28ab7 100644 --- a/libs/surfaces/mackie/controls.cc +++ b/libs/surfaces/mackie/controls.cc @@ -92,24 +92,33 @@ Control::set_control (boost::shared_ptr<AutomationControl> ac) void Control::set_value (float val) { - normal_ac->set_value (normal_ac->interface_to_internal (val)); + if (normal_ac) { + normal_ac->set_value (normal_ac->interface_to_internal (val)); + } } float Control::get_value () { + if (!normal_ac) { + return 0.0f; + } return normal_ac->internal_to_interface (normal_ac->get_value()); } void Control::start_touch (double when) { - return normal_ac->start_touch (when); + if (normal_ac) { + return normal_ac->start_touch (when); + } } void Control::stop_touch (double when, bool mark) { - return normal_ac->stop_touch (when, mark); + if (normal_ac) { + return normal_ac->stop_touch (when, mark); + } } |