From eb1bfaa82104528ce6ada01386c54538635baed8 Mon Sep 17 00:00:00 2001 From: Conor McCarthy Date: Wed, 14 Feb 2024 00:11:36 +1000 Subject: [PATCH] vkd3d-shader/dxil: Check for src param allocation failure in sm6_parser_emit_dx_tertiary(). --- 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 39d7fcaf..afe3280d 100644 --- a/libs/vkd3d-shader/dxil.c +++ b/libs/vkd3d-shader/dxil.c @@ -3935,7 +3935,8 @@ static void sm6_parser_emit_dx_tertiary(struct sm6_parser *sm6, enum dx_intrinsi unsigned int i; vsir_instruction_init(ins, &sm6->p.location, sm6_dx_map_tertiary_op(op)); - src_params = instruction_src_params_alloc(ins, 3, sm6); + if (!(src_params = instruction_src_params_alloc(ins, 3, sm6))) + return; for (i = 0; i < 3; ++i) src_param_init_from_value(&src_params[i], operands[i]);