diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-02-02 08:14:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-02 08:14:19 +0100 |
commit | e59e6c69c491e60e7d462540f286c3edfe5fcb31 (patch) | |
tree | 9b65cf0e55f4c7c2ca1f0ba07044a74cc03e7cb4 /tools | |
parent | 53c4dfe857e671f4e53d9317a77dc8a82bf91505 (diff) | |
parent | a64a348054ee0e3dccfb167afd93a62072726112 (diff) |
Merge pull request #7672 from Hinsbart/drag_crash
SceneTreeDock: Fix crash when dragging invalid nodes.
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 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) |