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

    Amend aba40a9ecf01fb
    
    Prevent crash when all documents have been closed
---
 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 df718787eb..a10a87cefc 100644
--- a/src/frontends/qt/GuiDocument.cpp
+++ b/src/frontends/qt/GuiDocument.cpp
@@ -1893,7 +1893,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