]> git.lyx.org Git - features.git/commitdiff
Prevent crash with statistics while view is busy (#12935)
authorJuergen Spitzmueller <spitz@lyx.org>
Tue, 16 Jan 2024 13:14:04 +0000 (14:14 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Tue, 16 Jan 2024 13:14:04 +0000 (14:14 +0100)
src/frontends/qt/GuiView.cpp

index c2ca3671dd47acea09769640ad16151b92aff690..8a97e104174145c081477013af248e72b5b16e6e 100644 (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_) {