Skip to content

Commit 5742004

Browse files
committed
Make sure response.Rows is not null
1 parent a8f3e87 commit 5742004

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/SeqCli/Cli/Commands/Bench/BenchCommand.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,14 @@ protected override async Task<int> Run()
134134
);
135135

136136
timings.PushElapsed(response.Statistics.ElapsedMilliseconds);
137-
var isScalarResult = response.Rows.Length == 1 && response.Rows[0].Length == 1;
138137

139-
if (i == _runs && isScalarResult)
138+
if (response.Rows != null)
140139
{
141-
lastResult = response.Rows[0][0];
140+
var isScalarResult = response.Rows.Length == 1 && response.Rows[0].Length == 1;
141+
if (isScalarResult && i == _runs)
142+
{
143+
lastResult = response.Rows[0][0];
144+
}
142145
}
143146
}
144147

0 commit comments

Comments
 (0)