From 1de041511831a8a02c0b2681a925e50917331281 Mon Sep 17 00:00:00 2001 From: kobewi Date: Wed, 22 Nov 2023 12:13:28 +0100 Subject: [PATCH] Don't abort loading when ext_resource is missing --- core/variant/variant_parser.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/variant/variant_parser.cpp b/core/variant/variant_parser.cpp index 86e7654090b0..e35751fd61e0 100644 --- a/core/variant/variant_parser.cpp +++ b/core/variant/variant_parser.cpp @@ -1026,7 +1026,10 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream, Ref res; Error err = p_res_parser->ext_func(p_res_parser->userdata, p_stream, res, line, r_err_str); if (err) { - return err; + // If the file is missing, the error can be ignored. + if (err != ERR_FILE_NOT_FOUND && err != ERR_CANT_OPEN) { + return err; + } } value = res;