avoid gtk assert on negative window size
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39553 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
3e0630be8a
commit
fb18afdd86
@ -92,7 +92,7 @@ void wxScrollHelperNative::DoAdjustScrollbar(GtkRange* range,
|
||||
// with a page size of 1. This will also clamp position to 0.
|
||||
int upper = 1;
|
||||
int page_size = 1;
|
||||
if (pixelsPerLine > 0 && winSize < virtSize)
|
||||
if (pixelsPerLine > 0 && winSize > 0 && winSize < virtSize)
|
||||
{
|
||||
upper = (virtSize + pixelsPerLine - 1) / pixelsPerLine;
|
||||
page_size = winSize / pixelsPerLine;
|
||||
|
Loading…
Reference in New Issue
Block a user