mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader: Watch for allocation failure from yyparse().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
405f2db4d9
commit
b35fd8628e
@ -1646,7 +1646,11 @@ int hlsl_compile_shader(const char *text, const struct vkd3d_shader_compile_info
|
||||
if (!hlsl_ctx_init(&ctx, message_context))
|
||||
return VKD3D_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
hlsl_lexer_compile(&ctx, text);
|
||||
if (hlsl_lexer_compile(&ctx, text) == 2)
|
||||
{
|
||||
hlsl_ctx_cleanup(&ctx);
|
||||
return VKD3D_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
if (ctx.failed)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user