Skip to content

Commit 535eab0

Browse files
committed
Fix FindInFiles crash when changing language
1 parent 5950fca commit 535eab0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

editor/script/find_in_files.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ void FindInFilesPanel::_on_button_clicked(TreeItem *p_item, int p_column, int p_
10681068
if (_file_items_results_count.has(item_parent)) {
10691069
_file_items_results_count[item_parent]--;
10701070
}
1071-
if (item_parent->get_child_count() < 2) {
1071+
if (item_parent->get_child_count() < 2 && item_parent != _results_display->get_root()) {
10721072
_file_items.erase(item_parent->get_metadata(0));
10731073
get_tree()->queue_delete(item_parent);
10741074
}

0 commit comments

Comments
 (0)