sw/source/core/view/viewimp.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 625b43530b5a8348635092086427288fc8c0f0fe
Author:     Miklos Vajna <[email protected]>
AuthorDate: Tue Sep 6 08:38:11 2022 +0200
Commit:     Miklos Vajna <[email protected]>
CommitDate: Tue Sep 6 10:10:56 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/+/139466
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>

diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
index cb3773383b95..07d42473aac3 100644
--- a/sw/source/core/view/viewimp.cxx
+++ b/sw/source/core/view/viewimp.cxx
@@ -163,7 +163,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())

Reply via email to