Fix editor crash when expanding/collapsing empty scene tree
This commit is contained in:
parent
e223a9c129
commit
2b7eab7c87
1 changed files with 3 additions and 0 deletions
|
@ -419,6 +419,9 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
|
||||||
|
|
||||||
if (!selected_item) {
|
if (!selected_item) {
|
||||||
selected_item = tree->get_root();
|
selected_item = tree->get_root();
|
||||||
|
if (!selected_item) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool collapsed = _is_collapsed_recursive(selected_item);
|
bool collapsed = _is_collapsed_recursive(selected_item);
|
||||||
|
|
Loading…
Reference in a new issue