win32ss/user/ntuser/painting.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/win32ss/user/ntuser/painting.c b/win32ss/user/ntuser/painting.c index e6fb2d6831f..0d101d74487 100644 --- a/win32ss/user/ntuser/painting.c +++ b/win32ss/user/ntuser/painting.c @@ -675,6 +675,12 @@ IntInvalidateWindows(PWND Wnd, PREGION Rgn, ULONG Flags) { RgnType = IntGdiCombineRgn(Rgn, Rgn, RgnWindow, RGN_AND); REGION_Delete(RgnWindow); + /* Nothing to paint, just return */ + if (RgnType == NULLREGION || RgnType == ERROR) + { + Wnd->state &= ~WNDS_NONCPAINT; + return; + } } } else