summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-08-02 15:47:41 +0200
committerGitHub <noreply@github.com>2021-08-02 15:47:41 +0200
commit538d026527a82ab5c73c0244cd27e49fc54dfe2a (patch)
treeb925a02ef5db871f3c51233dbbd053d7aa89841a
parentba8158fc63adb8fd7c4733ce63a5deaa24036a88 (diff)
parent053f20be769b5e8dfe76d8ea8a086a07a1b17db9 (diff)
Merge pull request #51176 from KoBeWi/nullbind
Add null check to Tween.bind_node()
-rw-r--r--scene/animation/tween.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp
index a57e986877..542011618d 100644
--- a/scene/animation/tween.cpp
+++ b/scene/animation/tween.cpp
@@ -140,6 +140,8 @@ bool Tween::is_valid() {
}
Ref<Tween> Tween::bind_node(Node *p_node) {
+ ERR_FAIL_NULL_V(p_node, this);
+
bound_node = p_node->get_instance_id();
is_bound = true;
return this;