X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/add7cadd99d1b40dc012db655643f9c8c7080029..582f07c2532e6e2d7d1ccb235354548e9bada9bf:/src/gtk/scrolwin.cpp diff --git a/src/gtk/scrolwin.cpp b/src/gtk/scrolwin.cpp index 3d257acc26..86728b90ab 100644 --- a/src/gtk/scrolwin.cpp +++ b/src/gtk/scrolwin.cpp @@ -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;