diff --git a/lcl/include/customnotebook.inc b/lcl/include/customnotebook.inc index 914167cceb..f68d23567a 100644 --- a/lcl/include/customnotebook.inc +++ b/lcl/include/customnotebook.inc @@ -318,7 +318,9 @@ begin Inc(VisiblePageInd) else begin if VisiblePageInd < Result then - Inc(Result); + Inc(Result) + else + Break; end; end; end