summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorIgnacio Etcheverry <ignalfonsore@gmail.com>2019-07-08 15:13:57 +0200
committerIgnacio Etcheverry <ignalfonsore@gmail.com>2019-07-08 15:13:57 +0200
commit2c83255013b45a558d967e190cf5ddfb03f09dd6 (patch)
treeede3695f1dc43080875989f0028f4b7a42150aea /modules
parentb0cbf4e2b2f38e3fc349e54bac2facdd2bc13416 (diff)
Fix C# bindings detection of abstract classes
ClassDB::can_instance was changed recently breaking our code, as the editor is not yet initialized. Check ClassInfo::creation_func directly.
Diffstat (limited to 'modules')
-rw-r--r--modules/mono/editor/bindings_generator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp
index 1a440e5ced..b7a85b6216 100644
--- a/modules/mono/editor/bindings_generator.cpp
+++ b/modules/mono/editor/bindings_generator.cpp
@@ -2192,7 +2192,7 @@ void BindingsGenerator::_populate_object_type_interfaces() {
itype.base_name = ClassDB::get_parent_class(type_cname);
itype.is_singleton = Engine::get_singleton()->has_singleton(itype.proxy_name);
- itype.is_instantiable = ClassDB::can_instance(type_cname) && !itype.is_singleton;
+ itype.is_instantiable = class_info->creation_func && !itype.is_singleton;
itype.is_reference = ClassDB::is_parent_class(type_cname, name_cache.type_Reference);
itype.memory_own = itype.is_reference;