Don't touch the rect if hwnd is invalid.
authorHuw Davies <huw@codeweavers.com>
Tue, 4 Jan 2005 20:33:22 +0000 (20:33 +0000)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 4 Jan 2005 20:33:22 +0000 (20:33 +0000)
windows/winpos.c

index 6f71337f19071b726360e62829eb3dc5731c8983..8a7770d45d41a82f425a91c7155008a9407a94b4 100644 (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;
 }