[sequence] Fixed crash due to undefined sequence

Change-Id: Ie67ff4aa9a53eb8b04535e3b61737e11c9049316
This commit is contained in:
Arthur Camouseigt
2020-09-14 12:41:29 +02:00
committed by Émilie Feral
parent b8544e3708
commit 51002066e9
7 changed files with 27 additions and 10 deletions

View File

@@ -127,7 +127,7 @@ const Expression GlobalContext::ExpressionForSequence(const SymbolAbstract & sym
char unknownN[bufferSize];
Poincare::SerializationHelper::CodePoint(unknownN, bufferSize, UCodePointUnknown);
float rank = symbol.childAtIndex(0).approximateWithValueForSymbol<float>(unknownN, unknownSymbolValue, ctx, Preferences::sharedPreferences()->complexFormat(),Preferences::sharedPreferences()->angleUnit());
if (std::floor(rank) == rank) {
if (std::floor(rank) == rank && seq.hasValidExpression()) {
SequenceContext sqctx(ctx, sequenceStore());
return Float<double>::Builder(seq.evaluateXYAtParameter(rank, &sqctx).x2());
} else {