From f3aaa713d9296bae68a6db91157a2063f01fddc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 30 Jul 2021 23:22:00 +0200 Subject: VariantParser: Fix uninitialized ResourceParser funcs They could cause a segfault when parsing values with ID "Resource" as apparently we never set a valid `func` for it. Fixes crash part of #42115. --- core/variant/variant_parser.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core') diff --git a/core/variant/variant_parser.h b/core/variant/variant_parser.h index 05fc29b5e0..1ba26db6ed 100644 --- a/core/variant/variant_parser.h +++ b/core/variant/variant_parser.h @@ -73,9 +73,9 @@ public: struct ResourceParser { void *userdata = nullptr; - ParseResourceFunc func; - ParseResourceFunc ext_func; - ParseResourceFunc sub_func; + ParseResourceFunc func = nullptr; + ParseResourceFunc ext_func = nullptr; + ParseResourceFunc sub_func = nullptr; }; enum TokenType { -- cgit v1.2.3