From d76ef83dc62f185838acf7c3731fb486c8b36b1a Mon Sep 17 00:00:00 2001 From: Tim Allison Date: Thu, 20 Oct 2016 18:58:47 +0000 Subject: [PATCH] BUG-60286 avoid NPE XWPFRun. Didn't add unit test or document...didn't seem to be worth it. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765863 13f79535-47bb-0310-9956-ffa450edef68 --- src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java index ea931e7349..c2718ab43c 100644 --- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java +++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java @@ -1077,7 +1077,7 @@ public class XWPFRun implements ISDTContents, IRunElement, CharacterRun { if (ctfldChar.getFldCharType() == STFldCharType.BEGIN) { if (ctfldChar.getFfData() != null) { for (CTFFCheckBox checkBox : ctfldChar.getFfData().getCheckBoxList()) { - if (checkBox.getDefault().getVal() == STOnOff.X_1) { + if (checkBox.getDefault() != null && checkBox.getDefault().getVal() == STOnOff.X_1) { text.append("|X|"); } else { text.append("|_|");