Prevent crash when clicking Mesh in MeshInstance when is scene root

This commit is contained in:
hilfazer
2021-02-26 19:28:09 +01:00
parent cb29e6c49c
commit 1810654369
2 changed files with 9 additions and 3 deletions

View File

@@ -1976,7 +1976,7 @@ bool Node::is_editable_instance(const Node *p_node) const {
Node *Node::get_deepest_editable_node(Node *p_start_node) const {
ERR_FAIL_NULL_V(p_start_node, nullptr);
ERR_FAIL_COND_V(!is_a_parent_of(p_start_node), nullptr);
ERR_FAIL_COND_V(!is_a_parent_of(p_start_node), p_start_node);
Node const *iterated_item = p_start_node;
Node *node = p_start_node;