diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index f99e4a7c2978..41f4cbe9f669 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -1033,14 +1033,14 @@ bool SwCursorShell::GotoNextOutline() do { - if (nPos == rNds.GetOutLineNds().size()) - { - nPos = 0; - } - else if (!bUseFirst) + if (!bUseFirst) { ++nPos; } + if (rNds.GetOutLineNds().size() <= nPos) + { + nPos = 0; + } if (bUseFirst) {