aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvolzhs2016-08-24 02:19:48 +0900
committerRémi Verschelde2016-09-01 08:45:15 +0200
commitcd8beea3bf12bc3386ceac026dd76f36a7a5036c (patch)
tree6d20daa7162402d83a37d202245ab44fc12a3a8e
parent0657d439607c47f70bde10214c661eb79f8c7b1c (diff)
downloadgodot-cd8beea3bf12bc3386ceac026dd76f36a7a5036c.tar.gz
godot-cd8beea3bf12bc3386ceac026dd76f36a7a5036c.tar.zst
godot-cd8beea3bf12bc3386ceac026dd76f36a7a5036c.zip
Prevent to add node to selection when node is not inside tree
(cherry picked from commit 4857eabddb3eda7fef9ee3740a0325265209c640)
-rw-r--r--tools/editor/editor_data.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/editor/editor_data.cpp b/tools/editor/editor_data.cpp
index 8d3fd6c9c..35ec1ebfc 100644
--- a/tools/editor/editor_data.cpp
+++ b/tools/editor/editor_data.cpp
@@ -834,7 +834,7 @@ void EditorSelection::_node_removed(Node *p_node) {
void EditorSelection::add_node(Node *p_node) {
ERR_FAIL_NULL(p_node);
-
+ ERR_FAIL_COND(!p_node->is_inside_tree());
if (selection.has(p_node))
return;