diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 79317bb0..c6b6219e 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -168,6 +168,9 @@ static struct list *make_empty_list(struct hlsl_ctx *ctx) static void destroy_block(struct hlsl_block *block) { + if (!block) + return; + hlsl_block_cleanup(block); vkd3d_free(block); }