mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-11 23:54:18 +00:00
fix for VST crash in Live when the plugin is deleted with its window still open
This commit is contained in:
parent
9992bb6790
commit
c2ba5785ab
1 changed files with 6 additions and 3 deletions
|
|
@ -38,9 +38,7 @@
|
|||
|
||||
#define ADD_CARBON_BODGE 1 // see note below..
|
||||
|
||||
#if ADD_CARBON_BODGE
|
||||
#include <Carbon/Carbon.h>
|
||||
#endif
|
||||
#include <Carbon/Carbon.h>
|
||||
|
||||
#include "../juce_PluginHeaders.h"
|
||||
|
||||
|
|
@ -148,6 +146,11 @@ void detachComponentFromWindowRef (Component* comp, void* nsWindow)
|
|||
comp->removeFromDesktop();
|
||||
|
||||
[hostWindow release];
|
||||
|
||||
// The event loop needs to be run between closing the window and deleting the plugin,
|
||||
// presumably to let the cocoa objects get tidied up. Leaving out this line causes crashes
|
||||
// in Live when you delete the plugin with its window open.
|
||||
MessageManager::getInstance()->runDispatchLoopUntil (10);
|
||||
}
|
||||
|
||||
void setNativeHostWindowSize (void* nsWindow, Component* component, int newWidth, int newHeight)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue