Skip to content

Commit

Permalink
Merge pull request godotengine#44005 from RandomShaper/gds_needless_c…
Browse files Browse the repository at this point in the history
…heck

Remove useless check in GDScript
  • Loading branch information
akien-mga authored Jan 11, 2021
2 parents f6be114 + 86ece88 commit 813bdb4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions modules/gdscript/gdscript_vm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 813bdb4

Please sign in to comment.