summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-02-26 21:00:12 +0100
committerGitHub <noreply@github.com>2021-02-26 21:00:12 +0100
commit7b685a1558aaa7e014d358c2db8be83aef5d8b8f (patch)
tree86b784923c186721b07ac32b25cac6fe0a3bfb95 /scene/main
parent75d03f1fbd94efb5f8756e405de03cf271435336 (diff)
parent1810654369dab53c4544f78f537f5bc246ef0c1b (diff)
Merge pull request #46452 from hilfazer/click_mesh_instance_crash_40
Prevent crash when clicking Mesh in MeshInstance when is scene root
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/node.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 893621fbc4..df00af8f5b 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -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;