diff --git a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp index 1e6aa93dab..93ea916923 100644 --- a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp @@ -584,9 +584,11 @@ public: h + windowBorder.getTopAndBottom(), SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOOWNERZORDER); - updateBorderSize(); - - repaintNowIfTransparent(); + if (isValidPeer (this) + { + updateBorderSize(); + repaintNowIfTransparent(); + } } void setBounds (int x, int y, int w, int h, bool isNowFullScreen) @@ -601,9 +603,11 @@ public: h + windowBorder.getTopAndBottom(), SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOOWNERZORDER); - updateBorderSize(); - - repaintNowIfTransparent(); + if (isValidPeer (this) + { + updateBorderSize(); + repaintNowIfTransparent(); + } } Rectangle getBounds() const