From 4b05efd7b7a7e7bfa5ad76f7788d6d2c84cfe6cd Mon Sep 17 00:00:00 2001 From: reuk Date: Thu, 23 Jun 2022 12:46:08 +0100 Subject: [PATCH] Windows: Fix nullptr dereference when reopening plugin windows On Windows, when opening a plugin editor, destroying the plugin instance, and then creating a new instance and opening its editor, the plugin would crash because the VBlankDispatcher singleton could not be recreated. --- modules/juce_gui_basics/native/juce_win32_Windowing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp index 8d75d83faf..cb247722a7 100644 --- a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp @@ -1573,7 +1573,7 @@ public: threads.end()); } - JUCE_DECLARE_SINGLETON_SINGLETHREADED (VBlankDispatcher, true) + JUCE_DECLARE_SINGLETON_SINGLETHREADED (VBlankDispatcher, false) private: //==============================================================================