]> source.dussan.org Git - poi.git/commitdiff
BUG-60286 avoid NPE XWPFRun. Didn't add unit test or document...didn't seem to be...
authorTim Allison <tallison@apache.org>
Thu, 20 Oct 2016 18:58:47 +0000 (18:58 +0000)
committerTim Allison <tallison@apache.org>
Thu, 20 Oct 2016 18:58:47 +0000 (18:58 +0000)
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

index ea931e734952c49a09844b9e2e878e3df08bdb46..c2718ab43ca6ee5b4732bf3084de3a1f1307ac88 100644 (file)
@@ -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("|_|");