summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_function.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-02-15 15:30:46 +0100
committerGitHub <noreply@github.com>2020-02-15 15:30:46 +0100
commit264f20f8c1b326546494b10f485ff8bc7464b253 (patch)
tree3a0fa22ce848b4ee20df2057ebb5eb5d7ea8e89b /modules/gdscript/gdscript_function.h
parent53cf289f309ef44821e5bb1fe0c81de29a82d9d3 (diff)
parent867d073b98344b848c96012418912a7e72841a31 (diff)
Merge pull request #36189 from reduz/object-id-refactor
Changed logic and optimized ObjectID in ObjectDB and Variant, removed…
Diffstat (limited to 'modules/gdscript/gdscript_function.h')
-rw-r--r--modules/gdscript/gdscript_function.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/gdscript/gdscript_function.h b/modules/gdscript/gdscript_function.h
index ad95ebc543..7b7bcbaac9 100644
--- a/modules/gdscript/gdscript_function.h
+++ b/modules/gdscript/gdscript_function.h
@@ -77,8 +77,8 @@ struct GDScriptDataType {
return false;
}
- Object *obj = p_variant.operator Object *();
- if (!obj || !ObjectDB::instance_validate(obj)) {
+ Object *obj = p_variant.get_validated_object();
+ if (!obj) {
return false;
}
@@ -100,8 +100,8 @@ struct GDScriptDataType {
return false;
}
- Object *obj = p_variant.operator Object *();
- if (!obj || !ObjectDB::instance_validate(obj)) {
+ Object *obj = p_variant.get_validated_object();
+ if (!obj) {
return false;
}