Skip to content

Commit

Permalink
Call juce::PopupMenu::dismissAllActiveMenus in guiDestroy
Browse files Browse the repository at this point in the history
Recent version of JUCE do this in the VST2/3/AAX/AU wrappers
so symmetrize with the call here. This went un-noticed in surge
since we call it in the destructor of Surge GUI ourselves, from
before the juce call was there.
  • Loading branch information
baconpaul committed Dec 4, 2024
1 parent 24e70f7 commit 0c64a01
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/wrapper/clap-juce-wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0c64a01

Please sign in to comment.