From 81a76cc0fdf569e96697c4cea58debb74d6e5545 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 12 Apr 2012 04:03:14 +0000 Subject: A bit of crash proofiness for insane plugin UIs. Plugin UI touch confirmed working with suil r4173 and distrho JUCE plugin "TAL Filter II". git-svn-id: svn://localhost/ardour2/branches/3.0@11935 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/lv2_plugin_ui.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gtk2_ardour') diff --git a/gtk2_ardour/lv2_plugin_ui.cc b/gtk2_ardour/lv2_plugin_ui.cc index 96f2a182b7..5f9f024636 100644 --- a/gtk2_ardour/lv2_plugin_ui.cc +++ b/gtk2_ardour/lv2_plugin_ui.cc @@ -86,7 +86,11 @@ LV2PluginUI::touch(void* controller, uint32_t port_index, bool grabbed) { - LV2PluginUI* me = (LV2PluginUI*)controller; + LV2PluginUI* me = (LV2PluginUI*)controller; + if (port_index >= me->_controllables.size()) { + return; + } + ControllableRef control = me->_controllables[port_index]; if (grabbed) { control->start_touch(control->session().transport_frame()); -- cgit v1.2.3