From 1a2de25273a0a0611594483cf105d7039beb0749 Mon Sep 17 00:00:00 2001 From: Conor McCarthy Date: Wed, 14 Feb 2024 00:11:16 +1000 Subject: [PATCH] vkd3d-shader/dxil: Check for src param allocation failure in sm6_parser_emit_dx_cbuffer_load(). --- 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 bef8194e..39d7fcaf 100644 --- a/libs/vkd3d-shader/dxil.c +++ b/libs/vkd3d-shader/dxil.c @@ -3838,7 +3838,8 @@ static void sm6_parser_emit_dx_cbuffer_load(struct sm6_parser *sm6, enum dx_intr 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_init_vector_from_reg(src_param, &buffer->u.handle.reg); register_index_address_init(&src_param->reg.idx[2], operands[1], sm6); assert(src_param->reg.idx_count == 3);