Merge pull request #51176 from KoBeWi/nullbind

Add null check to Tween.bind_node()
This commit is contained in:
Rémi Verschelde 2021-08-02 15:47:41 +02:00 committed by GitHub
commit 538d026527
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -140,6 +140,8 @@ bool Tween::is_valid() {
} }
Ref<Tween> Tween::bind_node(Node *p_node) { Ref<Tween> Tween::bind_node(Node *p_node) {
ERR_FAIL_NULL_V(p_node, this);
bound_node = p_node->get_instance_id(); bound_node = p_node->get_instance_id();
is_bound = true; is_bound = true;
return this; return this;