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

New commits:
commit cf1ac23bcf7b68dc53eb1fff9350d0458bc93982
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Tue Sep 6 08:38:11 2022 +0200
Commit:     Aron Budea <aron.bu...@collabora.com>
CommitDate: Sun Oct 23 14:24:18 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 <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    (cherry picked from commit 625b43530b5a8348635092086427288fc8c0f0fe)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141575
    Reviewed-by: Aron Budea <aron.bu...@collabora.com>

diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
index 55add5aea29b..6e98df1757f6 100644
--- a/sw/source/core/view/viewimp.cxx
+++ b/sw/source/core/view/viewimp.cxx
@@ -168,7 +168,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