Make sure NC_HandleNCCalcSize returns a valid rectangle.

Painting fails if the rectangle is invalid.
This commit is contained in:
Mike McCormack 2000-09-12 23:37:57 +00:00 committed by Alexandre Julliard
parent 2a6c1e498c
commit a2bdadec88
1 changed files with 6 additions and 0 deletions

View File

@ -566,6 +566,12 @@ LONG NC_HandleNCCalcSize( WND *pWnd, RECT *winRect )
winRect->right -= tmpRect.right;
winRect->bottom -= tmpRect.bottom;
}
if (winRect->top > winRect->bottom)
winRect->bottom = winRect->top;
if (winRect->left > winRect->right)
winRect->right = winRect->left;
}
return result;
}