diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2021-07-30 23:22:00 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2021-07-30 23:23:31 +0200 |
commit | f3aaa713d9296bae68a6db91157a2063f01fddc5 (patch) | |
tree | 4dbdde97b1d3a36bcdfada3fc9a4777741c03f88 /core/variant | |
parent | 5a30ba7a66b32577e5b7d4a19e7fe5fbdad572e9 (diff) |
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.
Diffstat (limited to 'core/variant')
-rw-r--r-- | core/variant/variant_parser.h | 6 |
1 files changed, 3 insertions, 3 deletions
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 { |