Don't touch the rect if hwnd is invalid.
This commit is contained in:
parent
85763a1711
commit
2e51a04a8d
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue