aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java1
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()) {