Make sure NC_HandleNCCalcSize returns a valid rectangle.
Painting fails if the rectangle is invalid.
This commit is contained in:
parent
2a6c1e498c
commit
a2bdadec88
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue