From 535eab0b62fc77da4479f415a3b70be83d373f98 Mon Sep 17 00:00:00 2001 From: kobewi Date: Wed, 22 Oct 2025 22:57:50 +0200 Subject: [PATCH] Fix FindInFiles crash when changing language --- editor/script/find_in_files.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/script/find_in_files.cpp b/editor/script/find_in_files.cpp index 26ced16cf5b..cb9faceee7a 100644 --- a/editor/script/find_in_files.cpp +++ b/editor/script/find_in_files.cpp @@ -1068,7 +1068,7 @@ void FindInFilesPanel::_on_button_clicked(TreeItem *p_item, int p_column, int p_ if (_file_items_results_count.has(item_parent)) { _file_items_results_count[item_parent]--; } - if (item_parent->get_child_count() < 2) { + if (item_parent->get_child_count() < 2 && item_parent != _results_display->get_root()) { _file_items.erase(item_parent->get_metadata(0)); get_tree()->queue_delete(item_parent); }