mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[poincare] Prevent Bad access on abstract symbol context
Change-Id: I3077db5fdc2430ee11ceb1c6eb651e4331fb2ba0
This commit is contained in:
committed by
EmilieNumworks
parent
41778433b1
commit
a0497d3bd7
@@ -73,6 +73,11 @@ Expression SymbolAbstract::Expand(const SymbolAbstract & symbol, Context * conte
|
||||
{
|
||||
return clone ? symbol.clone() : *const_cast<SymbolAbstract *>(&symbol);
|
||||
}
|
||||
if (context == nullptr) {
|
||||
// A context is required
|
||||
assert(false);
|
||||
return Undefined::Builder();
|
||||
}
|
||||
Expression e = context->expressionForSymbolAbstract(symbol, clone);
|
||||
/* Replace all the symbols iteratively. This prevents a memory failure when
|
||||
* symbols are defined circularly. */
|
||||
|
||||
Reference in New Issue
Block a user