mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
glsl/ast: don't crash when func_name is NULL
This fixes a crash in GL43-CTS.shader_subroutine.subroutines_not_allowed_as_variables_constructors_and_argument_or_return_types If we can't find the func_name in one of these paths, we have emitted an earlier error so just return here. Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
4336196b7f
commit
6702c15810
1 changed files with 4 additions and 0 deletions
|
|
@ -2078,6 +2078,10 @@ ast_function_expression::hir(exec_list *instructions,
|
|||
func_name = id->primary_expression.identifier;
|
||||
}
|
||||
|
||||
/* an error was emitted earlier */
|
||||
if (!func_name)
|
||||
return ir_rvalue::error_value(ctx);
|
||||
|
||||
ir_function_signature *sig =
|
||||
match_function_by_name(func_name, &actual_parameters, state);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue