Create the scratch region before copying if necessary.

oldstable
Alexandre Julliard 2002-08-29 02:48:09 +00:00
parent 1033ffe423
commit 5f5bdd4a94
1 changed files with 2 additions and 0 deletions

View File

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