summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-03-15 21:06:21 +0000
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-06-06 08:33:40 +0000
commita7d4185bad915b51c23e8e5e40fbaa528852face (patch)
tree263969b4659c29323b8c2e4c7fe932d0890ce357
parent22ea5aef84996520062b2c5d58757cd6f00c98ee (diff)
crashtesting: Resolves: tdf#91291 crash on inserting text into footnote
(cherry picked from commit 367f13fd584d5b67cbc3a7787892f12655a65d6c) Change-Id: I157389607d2a54349c54ebdb3e283deee126ca67 Reviewed-on: https://gerrit.libreoffice.org/25897 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--sw/source/core/text/porfld.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 01026dc83596..63b6756d670e 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