diff options
author | Javen O'Neal <onealj@apache.org> | 2016-09-22 04:02:56 +0000 |
---|---|---|
committer | Javen O'Neal <onealj@apache.org> | 2016-09-22 04:02:56 +0000 |
commit | c6f365f4e438dc66d8810773c33e80d4feed82ca (patch) | |
tree | 382c72c140eda1a47d17acb5b81e125455e3ac4e | |
parent | 5b6d4546c22e98d7e43bb9b1e65dcedf3be1348a (diff) | |
download | poi-c6f365f4e438dc66d8810773c33e80d4feed82ca.tar.gz poi-c6f365f4e438dc66d8810773c33e80d4feed82ca.zip |
fix NPE
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1761844 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java index 1e51e5e3f7..b27100656b 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java @@ -319,6 +319,7 @@ public class ColumnHelper { } public int getIndexOfColumn(CTCols cols, CTCol searchCol) { + if (cols == null || searchCol == null) return -1; int i = 0; for (CTCol col : cols.getColArray()) { if (col.getMin() == searchCol.getMin() && col.getMax() == searchCol.getMax()) { |