Merge pull request #104772 from CreatedBySeb/fix-null-dict-values

Handle null values for object types, as seen in typed dictionaries
This commit is contained in:
Thaddeus Crews 2025-04-11 09:51:07 -05:00
commit fc370a35eb
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC

View file

@ -1360,7 +1360,14 @@ void EditorPropertyDictionary::update_property() {
Variant value;
object->get_by_property_name(slot.prop_name, value);
Variant::Type value_type = value.get_type();
Variant::Type value_type;
if (dict.is_typed_value() && slot.prop_key) {
value_type = value_subtype;
} else {
value_type = value.get_type();
}
// Check if the editor property needs to be updated.
bool value_as_id = Object::cast_to<EncodedObjectAsID>(value);