Don't touch the rect if hwnd is invalid.

This commit is contained in:
Huw Davies 2005-01-04 20:33:22 +00:00 committed by Alexandre Julliard
parent 85763a1711
commit 2e51a04a8d
1 changed files with 1 additions and 2 deletions

View File

@ -281,13 +281,12 @@ BOOL WINAPI GetClientRect( HWND hwnd, LPRECT rect )
{
BOOL ret;
rect->right = rect->bottom = 0;
if ((ret = WIN_GetRectangles( hwnd, NULL, rect )))
{
rect->right -= rect->left;
rect->bottom -= rect->top;
rect->left = rect->top = 0;
}
rect->left = rect->top = 0;
return ret;
}