Fix malformed program crash.
This commit is contained in:
5
expr.cpp
5
expr.cpp
@@ -3711,7 +3711,10 @@ ExprList::GetConstant(const Type *type) const {
|
||||
// expression to the type we need, then let the regular type
|
||||
// conversion machinery handle it.
|
||||
expr = TypeConvertExpr(exprs[i], elementType, "initializer list");
|
||||
Assert(expr != NULL);
|
||||
if (expr == NULL) {
|
||||
Assert(m->errorCount > 0);
|
||||
return NULL;
|
||||
}
|
||||
// Re-establish const-ness if possible
|
||||
expr = ::Optimize(expr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user