From 057759d41314ccae06e65677431893662a29ef0d Mon Sep 17 00:00:00 2001 From: Elise Date: Thu, 8 May 2025 21:11:23 +1000 Subject: [PATCH] Fix for debugging typed dictionaries --- core/io/marshalls.cpp | 4 +--- editor/editor_properties_array_dict.cpp | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp index 68456a76204..6eb7e2db040 100644 --- a/core/io/marshalls.cpp +++ b/core/io/marshalls.cpp @@ -1858,9 +1858,7 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo if (buf) { buf += len; } - const Variant *value = dict.getptr(kv.key); - ERR_FAIL_NULL_V(value, ERR_BUG); - err = encode_variant(*value, buf, len, p_full_objects, p_depth + 1); + err = encode_variant(kv.value, buf, len, p_full_objects, p_depth + 1); ERR_FAIL_COND_V(err, err); ERR_FAIL_COND_V(len % 4, ERR_BUG); r_len += len; diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp index 9824b9b8333..d6bcb5d0f84 100644 --- a/editor/editor_properties_array_dict.cpp +++ b/editor/editor_properties_array_dict.cpp @@ -1387,7 +1387,7 @@ void EditorPropertyDictionary::update_property() { Variant::Type value_type; - if (dict.is_typed_value() && slot.prop_key) { + if (dict.is_typed_value() && value_subtype != Variant::NIL && slot.prop_key) { value_type = value_subtype; } else { value_type = value.get_type();