diff --git a/expr.cpp b/expr.cpp index 358882b5..2f15f462 100644 --- a/expr.cpp +++ b/expr.cpp @@ -3995,7 +3995,10 @@ IndexExpr::GetValue(FunctionEmitContext *ctx) const { // Get a pointer type to the underlying elements const SequentialType *st = CastType(baseExprType); - AssertPos(pos, st != NULL); + if (st == NULL) { + Assert(m->errorCount > 0); + return NULL; + } lvType = PointerType::GetUniform(st->GetElementType()); // And do the indexing calculation into the temporary array in memory