summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_functions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript/gdscript_functions.cpp')
-rw-r--r--modules/gdscript/gdscript_functions.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript_functions.cpp b/modules/gdscript/gdscript_functions.cpp
index 1a5087eb4d..a46337d7dd 100644
--- a/modules/gdscript/gdscript_functions.cpp
+++ b/modules/gdscript/gdscript_functions.cpp
@@ -1441,8 +1441,8 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
if (p_args[0]->get_type() != Variant::OBJECT) {
r_ret = false;
} else {
- Object *obj = *p_args[0];
- r_ret = ObjectDB::instance_validate(obj);
+ Object *obj = p_args[0]->get_validated_object();
+ r_ret = obj != nullptr;
}
} break;