From 7b5fe0321ec276e1d3680f58e883395692c6771f Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Tue, 16 Jan 2024 14:14:04 +0100 Subject: [PATCH] Prevent crash with statistics while view is busy (#12935) --- src/frontends/qt/GuiView.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp index c2ca3671dd..8a97e10417 100644 --- a/src/frontends/qt/GuiView.cpp +++ b/src/frontends/qt/GuiView.cpp @@ -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_) { -- 2.39.5