Merge pull request #65323 from timothyqiu/variant-wild
Fix crash when encoding freed object in `ConfigFile`
This commit is contained in:
commit
9f2e907bac
1 changed files with 1 additions and 1 deletions
|
@ -1680,7 +1680,7 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case Variant::OBJECT: {
|
case Variant::OBJECT: {
|
||||||
Object *obj = p_variant;
|
Object *obj = p_variant.get_validated_object();
|
||||||
|
|
||||||
if (!obj) {
|
if (!obj) {
|
||||||
p_store_string_func(p_store_string_ud, "null");
|
p_store_string_func(p_store_string_ud, "null");
|
||||||
|
|
Loading…
Reference in a new issue