commit | a2bdadec88efaf230e10947930e22b3420320bf8 | [log] [tgz] |
---|---|---|
author | Mike McCormack <mike_mccormack@looksmart.com.au> | Tue Sep 12 23:37:57 2000 +0000 |
committer | Alexandre Julliard <julliard@winehq.org> | Tue Sep 12 23:37:57 2000 +0000 |
tree | ef053e5377a6e9ab42f11f89b130d775a219f647 | |
parent | 2a6c1e498c3f2c2a63ec77977a823ed44ca965de [diff] [blame] |
Make sure NC_HandleNCCalcSize returns a valid rectangle. Painting fails if the rectangle is invalid.
diff --git a/windows/nonclient.c b/windows/nonclient.c index 913a26b..942c0d3 100644 --- a/windows/nonclient.c +++ b/windows/nonclient.c
@@ -566,6 +566,12 @@ 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; }