sfx2/source/doc/sfxbasemodel.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f1729753193f4f2c69f45b4377a557cceeb72070
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Mon Jan 29 13:08:02 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Tue Jan 30 09:43:15 2024 +0100

    just get SfxViewShell::Current once
    
    Change-Id: Ie4d86076af63b68c7ae61570ce8e2b9ce8509e50
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162690
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index ad31130e514d..c25d31deb110 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -3264,8 +3264,8 @@ void SfxBaseModel::impl_store(  const   OUString&         
          sURL
         SfxGetpApp()->NotifyEvent( SfxEventHint( bSaveTo ? 
SfxEventHintId::SaveToDocFailed : SfxEventHintId::SaveAsDocFailed, 
GlobalEventConfig::GetEventName( bSaveTo ? GlobalEventId::SAVETODOCFAILED : 
GlobalEventId::SAVEASDOCFAILED),
                                                 m_pData->m_pObjectShell.get() 
) );
 
-        if ( comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current() 
)
-            SfxViewShell::Current()->libreOfficeKitViewCallback( 
LOK_CALLBACK_EXPORT_FILE, "ERROR"_ostr );
+        if (SfxViewShell* pNotifyView = comphelper::LibreOfficeKit::isActive() 
? SfxViewShell::Current() : nullptr)
+            pNotifyView->libreOfficeKitViewCallback(LOK_CALLBACK_EXPORT_FILE, 
"ERROR"_ostr);
 
         std::stringstream aErrCode;
         aErrCode << nErrCode;

Reply via email to