[poincare] Bug Product([1 1], 1, 3): if the intermediate result is

nullptr, escape the evaluation and return an undefined expression
This commit is contained in:
Émilie Feral
2018-05-22 13:48:31 +02:00
committed by LeaNumworks
parent f2d096be63
commit 2bd93844cd

View File

@@ -43,6 +43,9 @@ Expression * Sequence::templatedApproximate(Context& context, AngleUnit angleUni
delete result;
delete expression;
result = newResult;
if (result == nullptr) {
return new Complex<T>(Complex<T>::Float(NAN));
}
}
return result;
}