Merge pull request #44006 from RandomShaper/gds_needless_check_3.2

Remove useless check in GDScript (3.2)
This commit is contained in:
Rémi Verschelde 2021-01-11 13:53:42 +01:00 committed by GitHub
commit 0a8cc0a565
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -374,12 +374,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;