mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 03:36:32 +01:00
VST3: GUI d'tor re-order
We have to call close_view(), which calls IPlugView::removed() before destroying the parent widget. Previously ~VST3PluginUI() was called after the derived class destroyed the owned private `_gui_widget`, `_ns_view` or x11 parent. On windows that may lead to the hwnd of the window becoming invalid before the call to ::removed().
This commit is contained in:
parent
0d4ab880a8
commit
bbc54873ae
4 changed files with 6 additions and 2 deletions
|
|
@ -54,6 +54,8 @@ VST3HWNDPluginUI::VST3HWNDPluginUI (boost::shared_ptr<PluginInsert> pi, boost::s
|
|||
|
||||
VST3HWNDPluginUI::~VST3HWNDPluginUI ()
|
||||
{
|
||||
assert (_view_realized);
|
||||
_vst3->close_view ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -91,6 +91,8 @@ VST3NSViewPluginUI::VST3NSViewPluginUI (boost::shared_ptr<PluginInsert> pi, boos
|
|||
|
||||
VST3NSViewPluginUI::~VST3NSViewPluginUI ()
|
||||
{
|
||||
assert (_view_realized);
|
||||
_vst3->close_view ();
|
||||
[_ns_view removeFromSuperview];
|
||||
[_ns_view release];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,8 +56,6 @@ VST3PluginUI::VST3PluginUI (boost::shared_ptr<PluginInsert> pi, boost::shared_pt
|
|||
|
||||
VST3PluginUI::~VST3PluginUI ()
|
||||
{
|
||||
assert (_view_realized);
|
||||
_vst3->close_view ();
|
||||
}
|
||||
|
||||
gint
|
||||
|
|
|
|||
|
|
@ -190,6 +190,8 @@ VST3X11PluginUI::VST3X11PluginUI (boost::shared_ptr<PluginInsert> pi, boost::sha
|
|||
|
||||
VST3X11PluginUI::~VST3X11PluginUI ()
|
||||
{
|
||||
assert (_view_realized);
|
||||
_vst3->close_view ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue