mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 03:18:37 +08:00
Fix crash when selecting re-added Tree
item
This commit is contained in:
parent
a586e860e5
commit
f7c1c83daa
@ -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