commit 707004259059928c885136599d91af8348756013
parent 8ed673ee160a11e6d26e4557f7e30c995649843d
Author: JP Cimalando <jp-dev@inbox.ru>
Date: Thu, 1 Aug 2019 06:35:55 +0200
Fix macOS crash on editor closed and reopened
On Minihost Modular, the window will not be recreated correctly after
closing. It's because the host does not send the effEditClose opcode.
When effEditOpen is reentered, fVstUI!=nullptr would short-circuit the
initialization of the editor, and continue without an existing window.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/distrho/src/DistrhoPluginVST.cpp b/distrho/src/DistrhoPluginVST.cpp
@@ -590,7 +590,8 @@ public:
return 1;
case effEditOpen:
- if (fVstUI == nullptr)
+ delete fVstUI; // hosts which don't pair effEditOpen/effEditClose calls (Minihost Modular)
+ fVstUI = nullptr;
{
# if DISTRHO_OS_MAC
if (! fUsingNsView)