sw/source/uibase/uiview/view.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit 3820e23c9f1547fe8c1dc9ece1686a405d101e78 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Wed Feb 8 09:04:14 2023 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed Feb 15 15:51:47 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/+/147052 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins (cherry picked from commit dab3de66e057f8d6794c427fb38cb2e333dfc93f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147059 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> 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() )