Only allow LV2 touch events for control inputs
authorRobin Gareus <robin@gareus.org>
Sun, 28 Oct 2018 19:34:21 +0000 (20:34 +0100)
committerRobin Gareus <robin@gareus.org>
Sun, 28 Oct 2018 19:34:21 +0000 (20:34 +0100)
This fixes a crash when a plugin sends a touch events for non-control ports.

gtk2_ardour/lv2_plugin_ui.cc

index 641fa8dce8fa23690dc0fd2ec05a1f501eb63bfd..3ed95c7e98831138f1721f5defa10096d75ecf64 100644 (file)
@@ -100,6 +100,9 @@ LV2PluginUI::touch(void*    controller,
        if (port_index >= me->_controllables.size()) {
                return;
        }
+       if (!me->_lv2->parameter_is_control(port_index) || !me->_lv2->parameter_is_input(port_index)) {
+               return;
+       }
 
        ControllableRef control = me->_controllables[port_index];
        if (grabbed) {