]> source.dussan.org Git - poi.git/commitdiff
Add null check
authorGreg Woolsey <gwoolsey@apache.org>
Tue, 21 Feb 2017 18:18:10 +0000 (18:18 +0000)
committerGreg Woolsey <gwoolsey@apache.org>
Tue, 21 Feb 2017 18:18:10 +0000 (18:18 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1783914 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/ss/formula/DataValidationEvaluator.java

index 7e49caad78b419254b5d875d0e8e9cde697bcafe..709a805735a31f105f3e094838952c930ebed244 100644 (file)
@@ -107,7 +107,8 @@ public class DataValidationEvaluator {
      *         validation applies
      */
     public DataValidation getValidationForCell(CellReference cell) {
-        return getValidationContextForCell(cell).getValidation();
+        final DataValidationContext vc = getValidationContextForCell(cell);
+        return vc == null ? null : vc.getValidation();
     }
 
     public DataValidationContext getValidationContextForCell(CellReference cell) {