mirror of
https://github.com/godotengine/godot.git
synced 2024-11-10 14:12:51 +00:00
Merge pull request #88917 from mihe/tree-selection-crash
Fix crash when selecting re-added `TreeItem::Cell`
This commit is contained in:
commit
23191b834e
@ -120,6 +120,10 @@ void TreeItem::_change_tree(Tree *p_tree) {
|
||||
}
|
||||
|
||||
if (tree->selected_item == this) {
|
||||
for (int i = 0; i < tree->selected_item->cells.size(); i++) {
|
||||
tree->selected_item->cells.write[i].selected = false;
|
||||
}
|
||||
|
||||
tree->selected_item = nullptr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user