Non-numeric Properties are not automatable
authorRobin Gareus <robin@gareus.org>
Fri, 8 Sep 2017 11:16:37 +0000 (13:16 +0200)
committerRobin Gareus <robin@gareus.org>
Fri, 8 Sep 2017 21:35:00 +0000 (23:35 +0200)
Fixes a crash, when the Generic-UI tries to access the AutomationList
of LV2 URID or String Properties.

libs/ardour/plugin_insert.cc

index 762b87149ee5953f77c77389f92a8cc0d4e5149e..2afd18d19972fab07fc97b924b5062ecbfc559a3 100644 (file)
@@ -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);
                }
        }