[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - sw/source

Caolán McNamara caolanm at redhat.com
Mon Jun 6 08:34:01 UTC 2016


 sw/source/core/text/porfld.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit a7d4185bad915b51c23e8e5e40fbaa528852face
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Mar 15 21:06:21 2016 +0000

    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 at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 01026dc..63b6756 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