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

New commits:
commit 25fb91ec9a4908fad631c890fe780b273f89a71e
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Wed Feb 8 09:04:14 2023 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Mon Feb 13 16:53:58 2023 +0000

    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>

diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 675becb47e61..9b69515637d6 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -503,6 +503,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