summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript.cpp
diff options
context:
space:
mode:
authorqarmin <mikrutrafal54@gmail.com>2019-07-01 12:59:42 +0200
committerqarmin <mikrutrafal54@gmail.com>2019-07-01 12:59:42 +0200
commit3c154eb93b3a098354bf6d18a9428826ec193f90 (patch)
treed9c8c44f13883ceadaefc95953f9cb077137b7c8 /modules/gdscript/gdscript.cpp
parenteaaff9da3178fa515a0f051fda932c1dd04d53db (diff)
Remove unnecessary code and add some error explanations
Diffstat (limited to 'modules/gdscript/gdscript.cpp')
-rw-r--r--modules/gdscript/gdscript.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp
index 95f3c12806..bc28f7009e 100644
--- a/modules/gdscript/gdscript.cpp
+++ b/modules/gdscript/gdscript.cpp
@@ -332,7 +332,7 @@ ScriptInstance *GDScript::instance_create(Object *p_this) {
}
Variant::CallError unchecked_error;
- return _create_instance(NULL, 0, p_this, Object::cast_to<Reference>(p_this), unchecked_error);
+ return _create_instance(NULL, 0, p_this, Object::cast_to<Reference>(p_this) != NULL, unchecked_error);
}
PlaceHolderScriptInstance *GDScript::placeholder_instance_create(Object *p_this) {