diff --git a/libs/vkd3d-shader/fx.c b/libs/vkd3d-shader/fx.c index 3503d67c6..5b776108c 100644 --- a/libs/vkd3d-shader/fx.c +++ b/libs/vkd3d-shader/fx.c @@ -5192,6 +5192,12 @@ static void fx_2_parse_fxlvm_expression(struct fx_parser *parser, const uint32_t code.ptr = find_d3dbc_section(blob, count, TAG_FXLC, &count); code.end = code.ptr + count; + if (!code.ptr) + { + fx_parser_error(parser, VKD3D_SHADER_ERROR_FX_INVALID_DATA, "Failed to locate expression code section."); + return; + } + fx_parse_fxlvm_expression(parser, &code); }