From: Tim Allison Date: Thu, 20 Oct 2016 18:58:47 +0000 (+0000) Subject: BUG-60286 avoid NPE XWPFRun. Didn't add unit test or document...didn't seem to be... X-Git-Tag: REL_3_16_BETA1~61 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d76ef83dc62f185838acf7c3731fb486c8b36b1a;p=poi.git 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 --- 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("|_|");