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
@ -54,6 +54,8 @@ VST3HWNDPluginUI::VST3HWNDPluginUI (boost::shared_ptr<PluginInsert> pi, boost::s
|
|||||||
|
|
||||||
VST3HWNDPluginUI::~VST3HWNDPluginUI ()
|
VST3HWNDPluginUI::~VST3HWNDPluginUI ()
|
||||||
{
|
{
|
||||||
|
assert (_view_realized);
|
||||||
|
_vst3->close_view ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -91,6 +91,8 @@ VST3NSViewPluginUI::VST3NSViewPluginUI (boost::shared_ptr<PluginInsert> pi, boos
|
|||||||
|
|
||||||
VST3NSViewPluginUI::~VST3NSViewPluginUI ()
|
VST3NSViewPluginUI::~VST3NSViewPluginUI ()
|
||||||
{
|
{
|
||||||
|
assert (_view_realized);
|
||||||
|
_vst3->close_view ();
|
||||||
[_ns_view removeFromSuperview];
|
[_ns_view removeFromSuperview];
|
||||||
[_ns_view release];
|
[_ns_view release];
|
||||||
}
|
}
|
||||||
|
@ -56,8 +56,6 @@ VST3PluginUI::VST3PluginUI (boost::shared_ptr<PluginInsert> pi, boost::shared_pt
|
|||||||
|
|
||||||
VST3PluginUI::~VST3PluginUI ()
|
VST3PluginUI::~VST3PluginUI ()
|
||||||
{
|
{
|
||||||
assert (_view_realized);
|
|
||||||
_vst3->close_view ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gint
|
gint
|
||||||
|
@ -190,6 +190,8 @@ VST3X11PluginUI::VST3X11PluginUI (boost::shared_ptr<PluginInsert> pi, boost::sha
|
|||||||
|
|
||||||
VST3X11PluginUI::~VST3X11PluginUI ()
|
VST3X11PluginUI::~VST3X11PluginUI ()
|
||||||
{
|
{
|
||||||
|
assert (_view_realized);
|
||||||
|
_vst3->close_view ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user