From ef966b007deca9e76c24bc2afb74ba94a3173771 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 17 Feb 2015 10:02:24 +0000 Subject: assert on laying out fdo#82018-3.docx Change-Id: I325cd7ff03468009d06c886f800bd12e3acce976 --- sw/source/core/text/guess.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx index b4eea8768c94..f3c0bb0b0018 100644 --- a/sw/source/core/text/guess.cxx +++ b/sw/source/core/text/guess.cxx @@ -207,7 +207,7 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf, sal_Int32 nPorLen = 0; // do not call the break iterator nCutPos is a blank - sal_Unicode cCutChar = rInf.GetTxt()[ nCutPos ]; + sal_Unicode cCutChar = nCutPos < rInf.GetTxt().getLength() ? rInf.GetTxt()[nCutPos] : 0; if( CH_BLANK == cCutChar || CH_FULL_BLANK == cCutChar ) { nBreakPos = nCutPos; -- cgit v1.2.3