Author: onealj
Date: Thu Sep 22 04:02:56 2016
New Revision: 1761844

URL: http://svn.apache.org/viewvc?rev=1761844&view=rev
Log:
fix NPE

Modified:
    
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java

Modified: 
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java?rev=1761844&r1=1761843&r2=1761844&view=diff
==============================================================================
--- 
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java
 (original)
+++ 
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java
 Thu Sep 22 04:02:56 2016
@@ -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()) {



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

Reply via email to