Fix bug 54725 - HWPF where no parent style CHP exists, use an empty

set when processing the style to avoid a NPE

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1614926 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2014-07-31 15:41:58 +00:00
parent 4bfe3c6784
commit da61e7dd32

View File

@ -278,14 +278,15 @@ public final class StyleSheet implements HDFType {
CharacterProperties parentCHP = new CharacterProperties();
if(baseIndex != NIL_STYLE)
{
parentCHP = _styleDescriptions[baseIndex].getCHP();
if(parentCHP == null)
{
createChp(baseIndex);
parentCHP = _styleDescriptions[baseIndex].getCHP();
}
if(parentCHP == null) {
parentCHP = new CharacterProperties();
}
}
chp = CharacterSprmUncompressor.uncompressCHP(parentCHP, chpx, 0);