Fix null cells reference
This commit is contained in:
parent
28c5a69797
commit
fba2859b84
@ -57,6 +57,11 @@ public class GuessReader : IReader
|
||||
int successCounter = 0;
|
||||
object[,] cells = column.Value2;
|
||||
|
||||
if (cells == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int row = 1; row < column.Rows.Count + 1; row++)
|
||||
{
|
||||
object currentCell = cells[row, 1];
|
||||
@ -81,9 +86,15 @@ public class GuessReader : IReader
|
||||
|
||||
private bool IsAmountColumn(Range column, out double average)
|
||||
{
|
||||
object[,] cells = column.Value2;
|
||||
int successCounter = 0;
|
||||
average = 0.0;
|
||||
object[,] cells = column.Value2;
|
||||
|
||||
if (cells == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
int successCounter = 0;
|
||||
|
||||
for (int row = 1; row < column.Rows.Count + 1; row++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user