diff --git a/src/wrapper/clap-juce-wrapper.cpp b/src/wrapper/clap-juce-wrapper.cpp index 2cf6909..688f3f6 100644 --- a/src/wrapper/clap-juce-wrapper.cpp +++ b/src/wrapper/clap-juce-wrapper.cpp @@ -2076,7 +2076,11 @@ class ClapJuceWrapper : public clap::helpers::Plugin< void guiDestroy() noexcept override { - editorWrapper.reset(nullptr); + if (editorWrapper) + { + juce::PopupMenu::dismissAllActiveMenus(); + editorWrapper.reset(nullptr); + } guiParentAttached = false; }