Explorar o código

Merge pull request #51176 from KoBeWi/nullbind

Add null check to Tween.bind_node()
Rémi Verschelde %!s(int64=4) %!d(string=hai) anos
pai
achega
538d026527
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      scene/animation/tween.cpp

+ 2 - 0
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;