sw/source/core/view/viewimp.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit cd30c34ed8465555b217b25ff353ae623923a7e4 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Tue Sep 6 08:38:11 2022 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Thu Sep 8 09:49:15 2022 +0200 sw: fix crash in SwViewShellImp::AddPendingLOKInvalidation() Fatal signal received: SIGSEGV code: 1 for address: 0x0 program/libswlo.so SwViewShellImp::AddPendingLOKInvalidation(SwRect const&) sw/source/core/view/viewimp.cxx:167 program/libswlo.so Notify(SwFlyFrame*, SwPageFrame*, SwRect const&, SwRect const*) sw/source/core/layout/frmtool.cxx:3299 program/libswlo.so SwFlyNotify::~SwFlyNotify() sw/inc/anchoredobject.hxx:204 program/libswlo.so SwFlyFreeFrame::MakeAll(OutputDevice*) sw/source/core/layout/flylay.cxx:141 (discriminator 3) Change-Id: I01a64c6e0c2ad4c72cf1a9edeca2aa22e08441b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139629 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx index 3beb58c448d0..272cd962e6f6 100644 --- a/sw/source/core/view/viewimp.cxx +++ b/sw/source/core/view/viewimp.cxx @@ -166,7 +166,7 @@ bool SwViewShellImp::AddPaintRect( const SwRect &rRect ) void SwViewShellImp::AddPendingLOKInvalidation( const SwRect& rRect ) { std::vector<SwRect>& l = m_pendingLOKInvalidations; - if(l.empty()) // Announce that these invalidations will need flushing. + if(l.empty() && m_pShell && m_pShell->GetSfxViewShell()) // Announce that these invalidations will need flushing. m_pShell->GetSfxViewShell()->libreOfficeKitViewAddPendingInvalidateTiles(); // These are often repeated, so check first for duplicates. if( std::find( l.begin(), l.end(), rRect ) == l.end())