From 8312ead0d99cfc308f2f7635bae3da6bf0ff5489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 17 Feb 2020 11:55:36 +0100 Subject: ClassDB: Workaround double-free for GDScript This is a temporary hack until vnen and reduz can work on a proper fix. The changes in 867d073b98344b848c96012418912a7e72841a31 exposed a GDScript issue, which apparently triggers an automatic unreferencing. This hack only makes it possible to use the editor again, but GDScript is still broken. --- core/class_db.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/class_db.cpp b/core/class_db.cpp index a2941d70f6..2fd0ee2d89 100644 --- a/core/class_db.cpp +++ b/core/class_db.cpp @@ -1410,7 +1410,10 @@ Variant ClassDB::class_get_default_property_value(const StringName &p_class, con cleanup_c = false; } else if (ClassDB::can_instance(p_class)) { c = ClassDB::instance(p_class); - cleanup_c = true; +#ifndef _MSC_VER +#warning FIXME: ObjectID refactoring broke GDScript handling of reference pointers, this needs a proper fix. +#endif + cleanup_c = (p_class != StringName("GDScript")); } if (c) { -- cgit v1.2.3