diff options
author | Robin Gareus <robin@gareus.org> | 2017-09-08 13:16:37 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-09-08 23:35:00 +0200 |
commit | 8bc2bf0155740b6f77bbe917285cd13610bdcb81 (patch) | |
tree | 1daf2d45caae4a3ce4073c9d990f759f01932c08 /libs/ardour/plugin_insert.cc | |
parent | 4459761f4d3f10b6c4d5c0debff69ce755907423 (diff) |
Non-numeric Properties are not automatable
Fixes a crash, when the Generic-UI tries to access the AutomationList
of LV2 URID or String Properties.
Diffstat (limited to 'libs/ardour/plugin_insert.cc')
-rw-r--r-- | libs/ardour/plugin_insert.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc index 762b87149e..2afd18d199 100644 --- a/libs/ardour/plugin_insert.cc +++ b/libs/ardour/plugin_insert.cc @@ -492,7 +492,11 @@ PluginInsert::create_automatable_parameters () if (Variant::type_is_numeric(desc.datatype)) { list = boost::shared_ptr<AutomationList>(new AutomationList(param, desc)); } - add_control (boost::shared_ptr<AutomationControl> (new PluginPropertyControl(this, param, desc, list))); + boost::shared_ptr<AutomationControl> c (new PluginPropertyControl(this, param, desc, list)); + if (!Variant::type_is_numeric(desc.datatype)) { + c->set_flags (Controllable::Flag ((int)c->flags() | Controllable::NotAutomatable)); + } + add_control (c); } } |