diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index e4559c6849..5bdb101ff6 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -8002,7 +8002,7 @@ bool wxGrid::MovePageUp() int y = GetRowTop(row); int newRow = YToRow( y - ch + 1 ); - if ( newRow == -1 ) + if ( newRow < 0 ) { newRow = 0; }