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

New commits:
commit 20f6e960cda073012a56597bf6544524240ce246
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Thu Aug 17 08:24:05 2023 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Fri Aug 18 13:25:13 2023 +0200

    sfx2: fix crash in SfxLokHelper::notifyOtherView()
    
    Crashreport signature:
    
    Fatal signal received: SIGSEGV code: 1 for address: 0x0
    program/libmergedlo.so
            SfxLokHelper::notifyOtherView(SfxViewShell const*, SfxViewShell 
const*, int, boost::property_tree::basic_ptree<std::string, std::string, 
std::less<std::string> > const&)
                    sfx2/source/view/lokhelper.cxx:473
    program/libmergedlo.so
            ImpEditView::ShowCursor(bool, bool)
                    editeng/source/editeng/impedit.cxx:1423
    program/../program/libsclo.so
            ScViewData::SetEditEngine(ScSplitPos, ScEditEngineDefaulter*, 
vcl::Window*, short, int)
                    sc/source/ui/view/viewdata.cxx:1635
    program/libsclo.so
            ScTabView::UpdateEditView()
                    sc/source/ui/view/tabview3.cxx:2190
    
    Change-Id: I219a1e9685db9bc3ea03d6ab67ff5db74aac9343
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155823
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index a6d9ef825e35..5bf6e8a1a2c4 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -463,7 +463,7 @@ void SfxLokHelper::notifyOtherView(const SfxViewShell* 
pThisView, SfxViewShell c
                                    int nType, const 
boost::property_tree::ptree& rTree)
 {
     assert(pThisView != nullptr && "pThisView must be valid");
-    if (DisableCallbacks::disabled())
+    if (DisableCallbacks::disabled() || !pOtherView)
         return;
 
     const int viewId = SfxLokHelper::getView(pThisView);

Reply via email to