diff options
author | Juan Linietsky <juan@godotengine.org> | 2020-02-13 16:03:10 -0300 |
---|---|---|
committer | Juan Linietsky <juan@godotengine.org> | 2020-02-15 08:36:04 -0300 |
commit | 867d073b98344b848c96012418912a7e72841a31 (patch) | |
tree | 3a0fa22ce848b4ee20df2057ebb5eb5d7ea8e89b /modules/gdscript/gdscript_functions.cpp | |
parent | 53cf289f309ef44821e5bb1fe0c81de29a82d9d3 (diff) | |
download | redot-engine-867d073b98344b848c96012418912a7e72841a31.tar.gz |
Changed logic and optimized ObjectID in ObjectDB and Variant, removed RefPtr.
Diffstat (limited to 'modules/gdscript/gdscript_functions.cpp')
-rw-r--r-- | modules/gdscript/gdscript_functions.cpp | 4 |
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; |