diff --git a/core/variant_parser.h b/core/variant_parser.h index 19478c9be67..856e6289b16 100644 --- a/core/variant_parser.h +++ b/core/variant_parser.h @@ -73,10 +73,10 @@ public: typedef Error (*ParseResourceFunc)(void *p_self, Stream *p_stream, Ref &r_res, int &line, String &r_err_str); struct ResourceParser { - void *userdata; - ParseResourceFunc func; - ParseResourceFunc ext_func; - ParseResourceFunc sub_func; + void *userdata = nullptr; + ParseResourceFunc func = nullptr; + ParseResourceFunc ext_func = nullptr; + ParseResourceFunc sub_func = nullptr; }; enum TokenType { diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp index fc5938f21c6..27a349d75c4 100644 --- a/scene/resources/resource_format_text.cpp +++ b/scene/resources/resource_format_text.cpp @@ -853,7 +853,6 @@ void ResourceInteractiveLoaderText::open(FileAccess *p_f, bool p_skip_first_tag) rp.ext_func = _parse_ext_resources; rp.sub_func = _parse_sub_resources; - rp.func = nullptr; rp.userdata = this; }