summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/editor/scene_tree_dock.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp
index 96b6686e2a..ea1de29d0f 100644
--- a/tools/editor/scene_tree_dock.cpp
+++ b/tools/editor/scene_tree_dock.cpp
@@ -1761,7 +1761,9 @@ void SceneTreeDock::_nodes_dragged(Array p_nodes,NodePath p_to,int p_type) {
for(int i=0;i<p_nodes.size();i++) {
Node *n=get_node((p_nodes[i]));
- nodes.push_back(n);
+ if (n) {
+ nodes.push_back(n);
+ }
}
if (nodes.size()==0)