X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/19193a2c85987b595932957e73013e7ea100f0e8..0f092804a2406ada66094d09bfc935d63e221d46:/src/univ/winuniv.cpp diff --git a/src/univ/winuniv.cpp b/src/univ/winuniv.cpp index 4ce63facfe..a7430cb2e4 100644 --- a/src/univ/winuniv.cpp +++ b/src/univ/winuniv.cpp @@ -659,9 +659,12 @@ void wxWindow::SetScrollbar(int orient, int range, bool refresh) { + wxASSERT_MSG( pageSize <= range, + _T("page size can't be greater than range") ); + bool hasClientSizeChanged = FALSE; wxScrollBar *scrollbar = GetScrollbar(orient); - if ( range ) + if ( range && (pageSize < range) ) { if ( !scrollbar ) {