Unsubscribe from signals when clearing references
This fixes crashes with plugins calling setDirty() when the UI is closed. `plugin` has already been reset before the actual window is closed: `PluginUIWindow::~PluginUIWindow()` runs, and destroys the window, here `~VST3NSViewPluginUI ()`. This closes the VST3 view, which triggers a `VST3PI::setDirty`. At this point in time `~PlugUIBase()` has not yet run, so all signals are still connected. setDirty() ends up calling PlugUIBase::update_preset_modified() which access `plugin` pointer, which is NULL.
This commit is contained in:
parent
291de1d277
commit
e3c3109618
|
@ -636,6 +636,7 @@ PlugUIBase::~PlugUIBase()
|
|||
void
|
||||
PlugUIBase::plugin_going_away ()
|
||||
{
|
||||
drop_connections ();
|
||||
/* drop references to the plugin/insert */
|
||||
insert.reset ();
|
||||
plugin.reset ();
|
||||
|
|
Loading…
Reference in New Issue