commit 2fb351500506a69159855068e479536db010bbb8
Author: Juergen Spitzmueller <[email protected]>
Date:   Wed Jun 25 10:52:47 2025 +0200

    Amend aba40a9ecf01fb
    
    Prevent crash when all documents have been closed
    
    (cherry picked from commit 0530ed89f39ad74388ed0c1b026dfe3597122d17)
---
 src/frontends/qt/GuiDocument.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp
index 372dab3deb..f1a995316b 100644
--- a/src/frontends/qt/GuiDocument.cpp
+++ b/src/frontends/qt/GuiDocument.cpp
@@ -1856,7 +1856,7 @@ GuiDocument::GuiDocument(GuiView & lv)
 
 void GuiDocument::checkOnClosing()
 {
-       if (buffer().isReadonly() || 
!bc().policy().buttonStatus(ButtonPolicy::RESTORE))
+       if (!bufferview() || buffer().isReadonly() || 
!bc().policy().buttonStatus(ButtonPolicy::RESTORE))
                // nothing to do
                return;
 
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to