diff options
Diffstat (limited to 'sc/source/core')
-rw-r--r-- | sc/source/core/tool/token.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 859b44327a78..3cb4a8836d61 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -4538,7 +4538,8 @@ void checkBounds( // No intersections. return; - if (aAbs.aStart.Row() <= rCheckRange.aStart.Row()) + // rCheckRange may be a virtual non-existent row being shifted in. + if (aAbs.aStart.Row() <= rCheckRange.aStart.Row() && rCheckRange.aStart.Row() < rLimits.GetMaxRowCount()) { // +-+ <---- top // | | |