Create the scratch region before copying if necessary.

This commit is contained in:
Alexandre Julliard 2002-08-29 02:48:09 +00:00
parent 1033ffe423
commit 5f5bdd4a94

View file

@ -211,6 +211,7 @@ static HRGN WIN_UpdateNCRgn(WND* wnd, HRGN hRgn, UINT uncFlags )
wnd->flags &= ~WIN_NEEDS_NCPAINT; wnd->flags &= ~WIN_NEEDS_NCPAINT;
if( wnd->hrgnUpdate > 1 ) if( wnd->hrgnUpdate > 1 )
{ {
if (!hRgn) hRgn = CreateRectRgn( 0, 0, 0, 0 );
CombineRgn( hRgn, wnd->hrgnUpdate, 0, RGN_COPY ); CombineRgn( hRgn, wnd->hrgnUpdate, 0, RGN_COPY );
hrgnRet = hRgn; hrgnRet = hRgn;
} }
@ -292,6 +293,7 @@ static HRGN WIN_UpdateNCRgn(WND* wnd, HRGN hRgn, UINT uncFlags )
copyrgn: copyrgn:
if( uncFlags & UNC_REGION ) if( uncFlags & UNC_REGION )
{ {
if (!hRgn) hRgn = CreateRectRgn( 0, 0, 0, 0 );
CombineRgn( hRgn, wnd->hrgnUpdate, 0, RGN_COPY ); CombineRgn( hRgn, wnd->hrgnUpdate, 0, RGN_COPY );
hrgnRet = hRgn; hrgnRet = hRgn;
} }