Commit 2e51a04a authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

Don't touch the rect if hwnd is invalid.

parent 85763a17
...@@ -281,13 +281,12 @@ BOOL WINAPI GetClientRect( HWND hwnd, LPRECT rect ) ...@@ -281,13 +281,12 @@ BOOL WINAPI GetClientRect( HWND hwnd, LPRECT rect )
{ {
BOOL ret; BOOL ret;
rect->right = rect->bottom = 0;
if ((ret = WIN_GetRectangles( hwnd, NULL, rect ))) if ((ret = WIN_GetRectangles( hwnd, NULL, rect )))
{ {
rect->right -= rect->left; rect->right -= rect->left;
rect->bottom -= rect->top; rect->bottom -= rect->top;
rect->left = rect->top = 0;
} }
rect->left = rect->top = 0;
return ret; return ret;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment