Skip to content

Commit

Permalink
Merge pull request #640 from houlongchao/patch-1
Browse files Browse the repository at this point in the history
Add null check
  • Loading branch information
tonyqus committed Jan 17, 2022
2 parents f1dcab2 + eabc4f3 commit 684d46e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main/SS/Formula/Functions/Sumifs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ internal static double CalcMatchingCells(AreaEval[] ranges, IMatchPredicate[] pr
AreaEval aeRange = ranges[i];
IMatchPredicate mp = predicates[i];

if (!mp.Matches(aeRange.GetRelativeValue(r, c)))
if (mp == null || !mp.Matches(aeRange.GetRelativeValue(r, c)))
{
matches = false;
break;
Expand Down Expand Up @@ -187,4 +187,4 @@ internal static AreaEval ConvertRangeArg(ValueEval eval)

}

}
}

0 comments on commit 684d46e

Please sign in to comment.