Patch from Nick to fix crash on closing a LV2 plugin
authorCarl Hetherington <carl@carlh.net>
Tue, 27 Mar 2012 21:08:11 +0000 (21:08 +0000)
committerCarl Hetherington <carl@carlh.net>
Tue, 27 Mar 2012 21:08:11 +0000 (21:08 +0000)
(#4794).

git-svn-id: svn://localhost/ardour2/branches/3.0@11764 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/lv2_plugin_ui.cc

index 7947a8e7bff324cdd327fb77caf421013546848c..dec02a7ebc7b813143db229daa53b269158437ac 100644 (file)
@@ -68,8 +68,11 @@ LV2PluginUI::write_to_ui(void*       controller,
                          const void* buffer)
 {
        LV2PluginUI* me = (LV2PluginUI*)controller;
-       suil_instance_port_event((SuilInstance*)me->_inst,
-                                port_index, buffer_size, format, buffer);
+
+       if (me->_inst) {
+               suil_instance_port_event((SuilInstance*)me->_inst,
+                                        port_index, buffer_size, format, buffer);
+       }
 }
 
 void