diff --git a/modules/juce_graphics/native/juce_Direct2DHwndContext_windows.cpp b/modules/juce_graphics/native/juce_Direct2DHwndContext_windows.cpp index 18f9b37e73..59cfb2f924 100644 --- a/modules/juce_graphics/native/juce_Direct2DHwndContext_windows.cpp +++ b/modules/juce_graphics/native/juce_Direct2DHwndContext_windows.cpp @@ -70,7 +70,7 @@ public: paintAreas = std::move (areas); } - auto getPaintAreas() const + const RectangleList& getPaintAreas() const { return paintAreas; } @@ -346,11 +346,8 @@ private: return hr; } - if (! swapChainThread) - { - if (swap.swapChainEvent.has_value()) - swapChainThread = std::make_unique (*this, directX->getD2DMultithread()); - } + if (! swapChainThread && swap.swapChainEvent.has_value()) + swapChainThread = std::make_unique (*this, directX->getD2DMultithread()); if (! compositionTree.has_value()) compositionTree = CompositionTree::create (adapter->dxgiDevice, hwnd, swap.chain);