stats: Fix crash on variance with single-column statistics

When doing the sum, we were setting the result as a null pointer,
and collapsing all later results as a consequence.

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
This commit is contained in:
Christophe de Dinechin 2024-01-28 09:08:06 +01:00
parent 41ddcae6b6
commit c7be6b14ec

View file

@ -824,7 +824,7 @@ algebraic_p StatsAccess::total(sxy_fn op, algebraic_r arg) const
}
row = +arow;
}
else
else if (result)
{
row = op(result, row, arg);
}