Prevent crash with statistics while view is busy (#12935)

This commit is contained in:
Juergen Spitzmueller 2024-01-16 14:14:04 +01:00
parent 930ff2b95d
commit 7b5fe0321e

View File

@ -1470,7 +1470,10 @@ void GuiView::showStats()
d.already_in_selection_ = false;
}
buf->updateStatistics(from, to);
// Don't attempt to calculate stats if
// the buffer is busy as this might crash (#12935)
if (!busy() && !bv->busy())
buf->updateStatistics(from, to);
QStringList stats;
if (word_count_enabled_) {