From 2366e41d6893c3eec3c827ff890c484f89a21d04 Mon Sep 17 00:00:00 2001 From: Sergey Vladimirov Date: Tue, 23 Aug 2011 09:26:37 +0000 Subject: [PATCH] fix NPE git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1160596 13f79535-47bb-0310-9956-ffa450edef68 --- src/scratchpad/src/org/apache/poi/hwpf/model/CHPX.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.39.5