Add missing NULL checks for add_child_below_node

This commit is contained in:
Marcelo Fernandez 2018-06-19 22:47:34 -03:00
parent fb5fc04230
commit 8c1c7ff131
1 changed files with 4 additions and 0 deletions

View File

@ -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) { 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); add_child(p_child, p_legible_unique_name);
if (is_a_parent_of(p_node)) { if (is_a_parent_of(p_node)) {