mirror of
https://github.com/godotengine/godot.git
synced 2025-01-23 11:03:13 -05:00
Don't recursively call _update_tree
When a node was previously selected and the test "selected == p_node" was true the code would use set_selected() to change the selection to nullptr. However, if the tree is dirty, which is always true in this codepath, this would lead to a recursive call to _update_tree() ultimately leading to a crash due to us running out of stack. This fixes #100666
This commit is contained in:
parent
89001f91d2
commit
62cff66383
1 changed files with 1 additions and 1 deletions
|
@ -369,7 +369,7 @@ void SceneTreeEditor::_update_node_subtree(Node *p_node, TreeItem *p_parent, boo
|
|||
item->set_selectable(0, false);
|
||||
item->deselect(0);
|
||||
if (selected == p_node) {
|
||||
set_selected(nullptr, false);
|
||||
selected = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue