SceneTreeDock: Fix crash when dragging invalid nodes.
Fixes #7529
(cherry picked from commit a64a348054
)
This commit is contained in:
parent
5e90183ba4
commit
6fb2abc7d8
1 changed files with 3 additions and 1 deletions
|
@ -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++) {
|
for(int i=0;i<p_nodes.size();i++) {
|
||||||
Node *n=get_node((p_nodes[i]));
|
Node *n=get_node((p_nodes[i]));
|
||||||
nodes.push_back(n);
|
if (n) {
|
||||||
|
nodes.push_back(n);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nodes.size()==0)
|
if (nodes.size()==0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue