Remove the plugin ui widget before deleting the plugin. this fixes a crash when deleting Invada lv2 plugins after the gui has been instantiated. from a3.
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@11218 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
329a75e7bc
commit
33e8abe6b3
|
@ -231,6 +231,23 @@ LV2PluginUI::lv2ui_instantiate(const std::string& title)
|
|||
_lv2->ParameterChanged.connect(mem_fun(*this, &LV2PluginUI::parameter_changed));
|
||||
}
|
||||
|
||||
void
|
||||
LV2PluginUI::lv2ui_free()
|
||||
{
|
||||
stop_updating (0);
|
||||
|
||||
if (_gui_widget) {
|
||||
remove (*_gui_widget);
|
||||
}
|
||||
|
||||
suil_instance_free((SuilInstance*)_inst);
|
||||
|
||||
_inst = NULL;
|
||||
_gui_widget = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
LV2PluginUI::~LV2PluginUI ()
|
||||
{
|
||||
//cout << "LV2PluginUI destructor called" << endl;
|
||||
|
@ -239,9 +256,9 @@ LV2PluginUI::~LV2PluginUI ()
|
|||
delete[] _values;
|
||||
}
|
||||
|
||||
suil_instance_free(_inst);
|
||||
_inst = NULL;
|
||||
|
||||
/* Close and delete GUI. */
|
||||
lv2ui_free();
|
||||
|
||||
_screen_update_connection.disconnect();
|
||||
|
||||
if (_lv2->is_external_ui()) {
|
||||
|
|
|
@ -81,6 +81,7 @@ class LV2PluginUI : public PlugUIBase, public Gtk::VBox
|
|||
const void* buffer);
|
||||
|
||||
void lv2ui_instantiate(const std::string& title);
|
||||
void lv2ui_free();
|
||||
|
||||
void parameter_changed(uint32_t, float);
|
||||
void parameter_update(uint32_t, float);
|
||||
|
|
Loading…
Reference in New Issue