diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-01-11 13:53:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-11 13:53:52 +0100 |
commit | 813bdb49419edc18810d382d4e2f8eadcf60bf48 (patch) | |
tree | d54e296f21cba8be153498d99b74a415c63ef807 /modules/gdscript | |
parent | f6be114d02499d857c4b546df1870acfd15b136a (diff) | |
parent | 86ece881e533371aafabd5eb31c641777e6ffa04 (diff) |
Merge pull request #44005 from RandomShaper/gds_needless_check
Remove useless check in GDScript
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/gdscript_vm.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/modules/gdscript/gdscript_vm.cpp b/modules/gdscript/gdscript_vm.cpp index 29c4ff6214..4e098d7a6d 100644 --- a/modules/gdscript/gdscript_vm.cpp +++ b/modules/gdscript/gdscript_vm.cpp @@ -476,11 +476,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a } if (p_instance) { - if (p_instance->base_ref && static_cast<Reference *>(p_instance->owner)->is_referenced()) { - self = REF(static_cast<Reference *>(p_instance->owner)); - } else { - self = p_instance->owner; - } + self = p_instance->owner; script = p_instance->script.ptr(); } else { script = _script; |