diff options
author | Andreas Haas <liu.gam3@gmail.com> | 2017-01-29 14:32:23 +0100 |
---|---|---|
committer | Andreas Haas <liu.gam3@gmail.com> | 2017-01-29 14:32:40 +0100 |
commit | a64a348054ee0e3dccfb167afd93a62072726112 (patch) | |
tree | b2f04e2f75ec05ffa351b8020a9b422f889712d4 /tools | |
parent | 96de0141ccef3bb035574010816dafdbfc17eb63 (diff) |
SceneTreeDock: Fix crash when dragging invalid nodes.
Fixes #7529
Diffstat (limited to 'tools')
-rw-r--r-- | tools/editor/scene_tree_dock.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp index b3e4c8ed70..7eb9836648 100644 --- a/tools/editor/scene_tree_dock.cpp +++ b/tools/editor/scene_tree_dock.cpp @@ -1760,7 +1760,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) |