From b30ab9802af8efc939576a344860f528363348e6 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 28 Oct 2018 20:34:21 +0100 Subject: Only allow LV2 touch events for control inputs This fixes a crash when a plugin sends a touch events for non-control ports. --- gtk2_ardour/lv2_plugin_ui.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk2_ardour/lv2_plugin_ui.cc b/gtk2_ardour/lv2_plugin_ui.cc index 641fa8dce8..3ed95c7e98 100644 --- a/gtk2_ardour/lv2_plugin_ui.cc +++ b/gtk2_ardour/lv2_plugin_ui.cc @@ -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) { -- cgit v1.2.3