From: Sergey Vladimirov Date: Tue, 23 Aug 2011 09:26:37 +0000 (+0000) Subject: fix NPE X-Git-Tag: REL_3_8_BETA4~1^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2366e41d6893c3eec3c827ff890c484f89a21d04;p=poi.git fix NPE git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1160596 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/CHPX.java b/src/scratchpad/src/org/apache/poi/hwpf/model/CHPX.java index 5789c8245c..add8ec9b1d 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/model/CHPX.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/CHPX.java @@ -72,9 +72,11 @@ public final class CHPX extends BytePropertyNode } CharacterProperties baseStyle = ss.getCharacterStyle( istd ); + if (baseStyle == null) + baseStyle = new CharacterProperties(); + CharacterProperties props = CharacterSprmUncompressor.uncompressCHP( baseStyle, getGrpprl(), 0 ); - ; return props; }