SceneTreeDock: Fix crash when dragging invalid nodes.

Fixes #7529

(cherry picked from commit a64a348054)
This commit is contained in:
Andreas Haas 2017-01-29 14:32:23 +01:00 committed by Rémi Verschelde
parent 5e90183ba4
commit 6fb2abc7d8

View File

@ -1742,7 +1742,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)