diff --git a/gtk2_ardour/lv2_plugin_ui.cc b/gtk2_ardour/lv2_plugin_ui.cc index ead7440b3a..3bd6ab1bc6 100644 --- a/gtk2_ardour/lv2_plugin_ui.cc +++ b/gtk2_ardour/lv2_plugin_ui.cc @@ -43,7 +43,11 @@ LV2PluginUI::lv2_ui_write(LV2UI_Controller controller, const void* buffer) { LV2PluginUI* me = (LV2PluginUI*)controller; - me->_controllables[port_index]->set_value(*(float*)buffer); + boost::shared_ptr ac = me->_controllables[port_index]; + + if (ac) { + ac->set_value(*(float*)buffer); + } } void