diff --git a/src/compiler/glsl/ast_function.cpp b/src/compiler/glsl/ast_function.cpp index 5cbc713e6e1..08a200347af 100644 --- a/src/compiler/glsl/ast_function.cpp +++ b/src/compiler/glsl/ast_function.cpp @@ -49,6 +49,10 @@ process_parameters(exec_list *instructions, exec_list *actual_parameters, ast->set_is_lhs(true); ir_rvalue *result = ast->hir(instructions, state); + /* Error happened, bail out. */ + if (state->error) + return 0; + ir_constant *const constant = result->constant_expression_value(mem_ctx);