sw/source/uibase/uiview/view.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 895853e617579e99aadcfc23afdb68de79db720f
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Wed Feb 8 09:04:14 2023 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Tue Feb 14 09:27:42 2023 +0100

    sw: fix crash in SwView::AttrChangedNotify()
    
    Crashreport signature:
    
    program/../program/libswlo.so
            SwView::AttrChangedNotify(LinkParamNone*)
                    sw/source/uibase/uiview/view.cxx:507
    program/../program/libswlo.so
            SwWrtShell::DrawSelChanged()
                    sw/source/uibase/wrtsh/wrtsh3.cxx:261
    program/../program/libswlo.so
            SwDrawView::MarkListHasChanged()
                    sw/source/core/draw/dview.cxx:767
    program/libmergedlo.so
            SdrMarkView::MarkObj(SdrObject*, SdrPageView*, bool, bool, 
std::vector<basegfx::B2DRange, std::allocator<basegfx::B2DRange> >&&)
                    svx/source/svdraw/svdmrkv.cxx:2196
    program/../program/libswlo.so
            SwDrawContact::DisconnectFromLayout(bool)
                    
/opt/rh/devtoolset-10/root/usr/include/c++/10/bits/stl_vector.h:336
    
    This seems to happen when the SwDrawContent delete is in progress, so
    we no longer have the shells at hand that are usually present.
    
    Change-Id: Iba0601654c946b85e7c2de33fe76d99b26a20eae
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146649
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Justin Luth <jl...@mail.com>
    (cherry picked from commit 25fb91ec9a4908fad631c890fe780b273f89a71e)

diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 8ed0e97301dc..8c3ffcde2322 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -528,6 +528,11 @@ IMPL_LINK_NOARG(SwView, AttrChangedNotify, LinkParamNone*, 
void)
     if ( GetEditWin().IsChainMode() )
         GetEditWin().SetChainMode( false );
 
+    if (!m_pWrtShell || !GetDocShell())
+    {
+        return;
+    }
+
     //Opt: Not if PaintLocked. During unlock a notify will be once more 
triggered.
     if( !m_pWrtShell->IsPaintLocked() && !g_bNoInterrupt &&
         GetDocShell()->IsReadOnly() )

Reply via email to