The two places that were still passing NULL had a state pointer to
pass. Not passing it in these places prevented termination of
compilation of erroneous programs.
if (var != NULL) {
type = result->type;
} else {
- _mesa_glsl_error(& loc, NULL, "`%s' undeclared",
+ _mesa_glsl_error(& loc, state, "`%s' undeclared",
this->primary_expression.identifier);
error_emitted = true;
}
if (is_error_type(type) && !error_emitted)
- _mesa_glsl_error(& loc, NULL, "type mismatch");
+ _mesa_glsl_error(& loc, state, "type mismatch");
return result;
}
int len;
va_list ap;
- if (state)
- state->error = true;
+ state->error = true;
len = snprintf(buf, sizeof(buf), "%u:%u(%u): error: ",
locp->source, locp->first_line, locp->first_column);