aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2014-07-31 15:41:58 +0000
committerNick Burch <nick@apache.org>2014-07-31 15:41:58 +0000
commit4eb322bae7e3fc8353f3a1f5290562ccf019a9e4 (patch)
treecd77579ccc4dec4717ea547db7a86cd7c4765562
parenta4e29760f894f8af8a1b7225cbcc3df3eb000251 (diff)
downloadpoi-4eb322bae7e3fc8353f3a1f5290562ccf019a9e4.tar.gz
poi-4eb322bae7e3fc8353f3a1f5290562ccf019a9e4.zip
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
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java b/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java
index e780a486af..ba213b7a4e 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java
@@ -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);