[Libreoffice-commits] core.git: sw/source
Caolán McNamara
caolanm at redhat.com
Tue Mar 15 21:07:28 UTC 2016
sw/source/core/text/porfld.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 367f13fd584d5b67cbc3a7787892f12655a65d6c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 15 21:06:21 2016 +0000
crashtesting: Related tdf#91291 assert on indexing into empty string
Change-Id: I157389607d2a54349c54ebdb3e283deee126ca67
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index d8f8a75..6322a2f 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -375,7 +375,8 @@ bool SwFieldPortion::Format( SwTextFormatInfo &rInf )
// These characters should not be contained in the follow
// field portion. They are handled via the HookChar mechanism.
- switch( aNew[0] )
+ const sal_Unicode nNew = !aNew.isEmpty() ? aNew[0] : 0;
+ switch (nNew)
{
case CH_BREAK : bFull = true;
// no break
More information about the Libreoffice-commits
mailing list