sfx2/source/doc/guisaveas.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c36bb3f22a55af0066b0d81a966ef8932d20bf7b
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Wed Jan 24 10:03:53 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Wed Jan 24 21:41:33 2024 +0100

    sfx2: check SfxViewShell::Current()
    
    Seen in 
https://crashreport.libreoffice.org/stats/crash_details/52df6de5-7ea8-48e4-8c45-f18b02d9a767
    
    Change-Id: I56c17234a0f82797d37e26b0c39eeba7f78fcee5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162492
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    (cherry picked from commit 1a4a215bc59e50958b2c04ac405c5200f5811970)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162468

diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 657d162ff732..9e06dca31dce 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1485,7 +1485,7 @@ bool SfxStoringHelper::GUIStoreModel( const 
uno::Reference< frame::XModel >& xMo
         }
     }
 
-    if (!comphelper::LibreOfficeKit::isActive() && !( m_nStoreMode & 
EXPORT_REQUESTED ) )
+    if (!comphelper::LibreOfficeKit::isActive() && !( m_nStoreMode & 
EXPORT_REQUESTED ) && SfxViewShell::Current() )
     {
         SfxObjectShell* pDocShell = SfxViewShell::Current()->GetObjectShell();
 

Reply via email to