From 8b111ed224e999a2de057bb8f4669ddedfc3132e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 23 Apr 2012 19:54:31 +0000 Subject: [PATCH] Fix crash when closing LV2 UIs. git-svn-id: svn://localhost/ardour2/branches/3.0@12067 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/lv2_plugin_ui.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gtk2_ardour/lv2_plugin_ui.cc b/gtk2_ardour/lv2_plugin_ui.cc index 7699f394d0..cacc24af66 100644 --- a/gtk2_ardour/lv2_plugin_ui.cc +++ b/gtk2_ardour/lv2_plugin_ui.cc @@ -310,18 +310,18 @@ LV2PluginUI::lv2ui_free() if (_gui_widget) { remove (*_gui_widget); + _gui_widget = NULL; } if (_ardour_buttons_box) { remove (*_ardour_buttons_box); - delete _ardour_buttons_box; - _ardour_buttons_box = 0; + _ardour_buttons_box = NULL; } - suil_instance_free((SuilInstance*)_inst); - - _inst = NULL; - _gui_widget = NULL; + if (_inst) { + suil_instance_free((SuilInstance*)_inst); + _inst = NULL; + } } LV2PluginUI::~LV2PluginUI ()