From 04a93401641bfd3d2766d66090c4ab549c8d436e Mon Sep 17 00:00:00 2001 From: Conor McCarthy Date: Wed, 14 Feb 2024 00:13:45 +1000 Subject: [PATCH] vkd3d-shader/dxil: Check for src param allocation failure in sm6_parser_emit_extractval(). --- libs/vkd3d-shader/dxil.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/dxil.c b/libs/vkd3d-shader/dxil.c index a175875b..fdaabc92 100644 --- a/libs/vkd3d-shader/dxil.c +++ b/libs/vkd3d-shader/dxil.c @@ -4962,7 +4962,8 @@ static void sm6_parser_emit_extractval(struct sm6_parser *sm6, const struct dxil vsir_instruction_init(ins, &sm6->p.location, VKD3DSIH_MOV); - src_param = instruction_src_params_alloc(ins, 1, sm6); + if (!(src_param = instruction_src_params_alloc(ins, 1, sm6))) + return; src_param->reg = src->u.reg; src_param_init_scalar(src_param, elem_idx);