1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-21 14:57:09 +00:00

Merge pull request #61678 from KoBeWi/🌲💥

Fix crash with empty scenes
This commit is contained in:
Rémi Verschelde
2022-06-05 01:28:56 +02:00
committed by GitHub

View File

@@ -584,6 +584,11 @@ bool SceneTreeEditor::_update_filter(TreeItem *p_parent, bool p_scroll_to_select
p_parent = tree->get_root(); p_parent = tree->get_root();
} }
if (!p_parent) {
// Tree is empty, nothing to do here.
return false;
}
bool keep = false; bool keep = false;
for (TreeItem *child = p_parent->get_first_child(); child; child = child->get_next()) { for (TreeItem *child = p_parent->get_first_child(); child; child = child->get_next()) {
keep = _update_filter(child, p_scroll_to_selected) || keep; keep = _update_filter(child, p_scroll_to_selected) || keep;