[LyX/master] Fix crash on closing of last buffer

Juergen Spitzmueller <[email protected]>
Newsgroups gmane.editors.lyx.cvs
Message-ID <[email protected]>
commit 0952739c50232635f5e1083b7a1d551e91106e2a
Author: Juergen Spitzmueller <[email protected]>
Date:   Fri Mar 20 17:36:45 2026 +0100

    Fix crash on closing of last buffer
    
    Do not attempt to update the color model in this process
---
 src/frontends/qt/GuiView.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index c88cdd4f7b..3edfdc29f8 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -1742,7 +1742,7 @@ void GuiView::onBufferViewChanged()
 	zoom_out_->setEnabled(currentBufferView()
 			      && zoom_slider_->value() > zoom_slider_->minimum());
 	d.stats_update_trigger_ = true;
-	if (!closing_)
+	if (!closing_ && currentBufferView() && !currentBufferView()->buffer().isClosing())
 		updateColorsModel();
 }
 
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.