SceneTreeDock: Fix crash when dragging invalid nodes.

Fixes #7529
This commit is contained in:
Andreas Haas 2017-01-29 14:32:23 +01:00
parent 96de0141cc
commit a64a348054
No known key found for this signature in database
GPG key ID: B5FFAE1B65FBD2E1

View file

@ -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)