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,8 +1760,10 @@ 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]));
if (n) {
nodes.push_back(n);
}
}
if (nodes.size()==0)
return;