From e19b1bde7172cdf1df30b0cb1bca28dfe07ca5d3 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 6 Jul 2020 11:19:33 +0100 Subject: [PATCH] VST3: Don't remove content wrapper component from desktop before destroying on Linux --- .../VST3/juce_VST3_Wrapper.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp index 05f329163e..bc7881560f 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -1180,14 +1180,13 @@ private: { if (component != nullptr) { - #if JUCE_WINDOWS || JUCE_LINUX + #if JUCE_WINDOWS component->removeFromDesktop(); - #if JUCE_LINUX - fdCallbackMap.clear(); + #elif JUCE_LINUX + fdCallbackMap.clear(); - if (auto* runLoop = getHostRunLoop()) - runLoop->unregisterEventHandler (this); - #endif + if (auto* runLoop = getHostRunLoop()) + runLoop->unregisterEventHandler (this); #else if (macHostWindow != nullptr) {