From 9383f8e09e4f32ba4ab5b2bd925ecfe7ed2a7784 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 31 Jan 2012 16:00:19 +0000 Subject: [PATCH] do not crash if an LV2 plugin calls the UI write callback with a port number that ardour has decided is not an automatable parameter. deeper questions surround this commit git-svn-id: svn://localhost/ardour2/branches/3.0@11398 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/lv2_plugin_ui.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gtk2_ardour/lv2_plugin_ui.cc b/gtk2_ardour/lv2_plugin_ui.cc index 785a6b9721..751985871d 100644 --- a/gtk2_ardour/lv2_plugin_ui.cc +++ b/gtk2_ardour/lv2_plugin_ui.cc @@ -47,6 +47,11 @@ LV2PluginUI::lv2_ui_write(void* controller, const void* buffer) { LV2PluginUI* me = (LV2PluginUI*)controller; + + if (port_index >= me->_controllables.size()) { + return; + } + boost::shared_ptr ac = me->_controllables[port_index]; if (ac) {