- Don't crash copying from a null pointer in a non client size calculation
authorGregor Schneider <grschneider@gmail.com>
Sat, 18 Apr 2009 16:25:18 +0000 (16:25 +0000)
committerGregor Schneider <grschneider@gmail.com>
Sat, 18 Apr 2009 16:25:18 +0000 (16:25 +0000)
- Several thousand more user32 win winetests should be executed now

svn path=/trunk/; revision=40584

reactos/dll/win32/user32/windows/nonclient.c

index da9b62d..ad22eda 100644 (file)
@@ -502,7 +502,13 @@ DefWndNCCalcSize(HWND hWnd, BOOL CalcSizeStruct, RECT *Rect)
    DWORD Style = GetClassLongW(hWnd, GCL_STYLE);
    DWORD ExStyle;
    SIZE WindowBorders;
-   RECT OrigRect = *Rect;
+   RECT OrigRect;
+
+   if (Rect == NULL)
+   {
+      return Result;
+   }
+   OrigRect = *Rect;
 
    if (CalcSizeStruct)
    {