diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 9870eaeb..fa136402 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -941,6 +941,9 @@ static bool add_return(struct hlsl_ctx *ctx, struct hlsl_block *block, { struct hlsl_ir_node *store; + if (return_value->data_type->class == HLSL_CLASS_ERROR) + return true; + if (!(return_value = add_implicit_conversion(ctx, block, return_value, return_type, loc))) return false;