diff --git a/.pick_status.json b/.pick_status.json index 551119b1d56..737d8ae502e 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -434,7 +434,7 @@ "description": "nir: fix nir_shader_get_function_for_name for functions without names.", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "2aa9eb497d0f670136b5c2a50b962f4ce0faa917", "notes": null diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 58b602e8a8b..62286b56b03 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -4185,7 +4185,7 @@ static inline nir_function * nir_shader_get_function_for_name(const nir_shader *shader, const char *name) { nir_foreach_function(func, shader) { - if (strcmp(func->name, name) == 0) + if (func->name && strcmp(func->name, name) == 0) return func; }