Browse Source

Add missing NULL checks for add_child_below_node

Marcelo Fernandez 7 năm trước cách đây
mục cha
commit
8c1c7ff131
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      scene/main/node.cpp

+ 4 - 0
scene/main/node.cpp

@@ -1095,6 +1095,10 @@ void Node::add_child(Node *p_child, bool p_legible_unique_name) {
 }
 
 void Node::add_child_below_node(Node *p_node, Node *p_child, bool p_legible_unique_name) {
+
+	ERR_FAIL_NULL(p_node);
+	ERR_FAIL_NULL(p_child);
+
 	add_child(p_child, p_legible_unique_name);
 
 	if (is_a_parent_of(p_node)) {