diff --git a/modules/juce_graphics/native/juce_Direct2DHwndContext_windows.cpp b/modules/juce_graphics/native/juce_Direct2DHwndContext_windows.cpp index d02ef1ff8e..26d4b45c8a 100644 --- a/modules/juce_graphics/native/juce_Direct2DHwndContext_windows.cpp +++ b/modules/juce_graphics/native/juce_Direct2DHwndContext_windows.cpp @@ -393,7 +393,8 @@ private: return false; if (presentation.getPresentation() == nullptr) - presentation = swapChainThread->getFreshPresentation(); + if (swapChainThread != nullptr) + presentation = swapChainThread->getFreshPresentation(); // Paint if: // resources are allocated