crashtesting: Related tdf#91291 assert on indexing into empty string

Change-Id: I157389607d2a54349c54ebdb3e283deee126ca67
This commit is contained in:
Caolán McNamara
2016-03-15 21:06:21 +00:00
parent 89e0a84a82
commit 367f13fd58

View File

@@ -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