From 5768c019c1b486d25c7eb17cc826bb3eaa0d8c22 Mon Sep 17 00:00:00 2001 From: Conor McCarthy Date: Thu, 9 Nov 2023 14:07:03 +1000 Subject: [PATCH] vkd3d-shader/ir: Check the handler before changing it to NOP in remove_dead_code(). --- libs/vkd3d-shader/ir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/ir.c b/libs/vkd3d-shader/ir.c index abc8b1cd..72ba057d 100644 --- a/libs/vkd3d-shader/ir.c +++ b/libs/vkd3d-shader/ir.c @@ -1295,9 +1295,9 @@ static void remove_dead_code(struct vkd3d_shader_parser *parser) { if (depth > 0) { - vkd3d_shader_instruction_make_nop(ins); if (ins->handler_idx != VKD3DSIH_ELSE) --depth; + vkd3d_shader_instruction_make_nop(ins); } else {