diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.mm b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.mm index 2f60dd5863..02e94096e0 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.mm +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.mm @@ -216,6 +216,7 @@ void detachComponentFromWindowRef (Component* comp, void* window, bool isNSView) else [hostWindow release]; + #if JUCE_MODAL_LOOPS_PERMITTED static bool needToRunMessageLoop = ! getHostType().isReaper(); // The event loop needs to be run between closing the window and deleting the plugin, @@ -226,6 +227,7 @@ void detachComponentFromWindowRef (Component* comp, void* window, bool isNSView) if (needToRunMessageLoop) for (int i = 20; --i >= 0;) MessageManager::getInstance()->runDispatchLoopUntil (1); + #endif return; }