diff --git a/reactos/subsys/win32k/ntuser/painting.c b/reactos/subsys/win32k/ntuser/painting.c index 0f8d1c9cdbb..575dc4e2135 100644 --- a/reactos/subsys/win32k/ntuser/painting.c +++ b/reactos/subsys/win32k/ntuser/painting.c @@ -769,9 +769,12 @@ NtUserBeginPaint(HWND hWnd, PAINTSTRUCT* UnsafePs) UnsafeIntGetRgnBox(Rgn, &Ps.rcPaint); RGNDATA_UnlockRgn(Rgn); IntGdiIntersectRect(&Ps.rcPaint, &Ps.rcPaint, &Window->ClientRect); - IntGdiOffsetRect(&Ps.rcPaint, - -Window->ClientRect.left, - -Window->ClientRect.top); + if (! IntGdiIsEmptyRect(&Ps.rcPaint)) + { + IntGdiOffsetRect(&Ps.rcPaint, + -Window->ClientRect.left, + -Window->ClientRect.top); + } } else {