diff options
author | David Robillard <d@drobilla.net> | 2012-04-12 04:03:14 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-04-12 04:03:14 +0000 |
commit | 81a76cc0fdf569e96697c4cea58debb74d6e5545 (patch) | |
tree | 0aea1ed5ad5bfeb5aec5e895e3c74a6b8208f1f6 /gtk2_ardour/lv2_plugin_ui.cc | |
parent | f991e11b7742b78101c9234a1f976cce0f4b0e49 (diff) |
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
Diffstat (limited to 'gtk2_ardour/lv2_plugin_ui.cc')
-rw-r--r-- | gtk2_ardour/lv2_plugin_ui.cc | 6 |
1 files changed, 5 insertions, 1 deletions
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()); |