summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-02-17 10:02:24 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-02-17 11:44:58 +0000
commitef966b007deca9e76c24bc2afb74ba94a3173771 (patch)
tree15c8faa7ce3768ba4ca2c5fbf366849fd8c12676
parent8de63ad5bb2a60f7306a9bfe15384cd0164109df (diff)
assert on laying out fdo#82018-3.docx
Change-Id: I325cd7ff03468009d06c886f800bd12e3acce976
-rw-r--r--sw/source/core/text/guess.cxx2
1 files changed, 1 insertions, 1 deletions
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;