You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ta...@apache.org on 2016/10/20 18:58:47 UTC

svn commit: r1765863 - /poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java

Author: tallison
Date: Thu Oct 20 18:58:47 2016
New Revision: 1765863

URL: http://svn.apache.org/viewvc?rev=1765863&view=rev
Log:
BUG-60286 avoid NPE XWPFRun.  Didn't add unit test or document...didn't seem to be worth it.

Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java?rev=1765863&r1=1765862&r2=1765863&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java Thu Oct 20 18:58:47 2016
@@ -1077,7 +1077,7 @@ public class XWPFRun implements ISDTCont
                 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("|_|");



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org