From: Robin Gareus Date: Fri, 8 Sep 2017 11:16:37 +0000 (+0200) Subject: Non-numeric Properties are not automatable X-Git-Tag: 5.12~28 X-Git-Url: https://main.carlh.net/gitweb/?p=ardour.git;a=commitdiff_plain;h=8bc2bf0155740b6f77bbe917285cd13610bdcb81 Non-numeric Properties are not automatable Fixes a crash, when the Generic-UI tries to access the AutomationList of LV2 URID or String Properties. --- 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(new AutomationList(param, desc)); } - add_control (boost::shared_ptr (new PluginPropertyControl(this, param, desc, list))); + boost::shared_ptr 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); } }