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) {