diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2022-11-09 01:59:49 -0600 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2022-11-09 01:59:53 -0600 |
commit | a3e52925bf6238ab245e30190d9f30b87119294b (patch) | |
tree | 5121f8a89b4ce76c25ff19c938894ed09a81f107 /core/object | |
parent | f4c354630aab9a2e96f46ded36d30c9bae2251b8 (diff) |
Fix default values on virtual classes causing errors in projects
Diffstat (limited to 'core/object')
-rw-r--r-- | core/object/class_db.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/object/class_db.cpp b/core/object/class_db.cpp index afde6863a3..ac6ad0fdd2 100644 --- a/core/object/class_db.cpp +++ b/core/object/class_db.cpp @@ -1460,7 +1460,7 @@ Variant ClassDB::class_get_default_property_value(const StringName &p_class, con if (Engine::get_singleton()->has_singleton(p_class)) { c = Engine::get_singleton()->get_singleton_object(p_class); cleanup_c = false; - } else if (ClassDB::can_instantiate(p_class)) { // Keep this condition in sync with doc_tools.cpp get_documentation_default_value. + } else if (ClassDB::can_instantiate(p_class) && !ClassDB::is_virtual(p_class)) { // Keep this condition in sync with doc_tools.cpp get_documentation_default_value. c = ClassDB::instantiate(p_class); cleanup_c = true; } |