sw/source/core/layout/findfrm.cxx |    4 ++--
 sw/source/core/layout/ftnfrm.cxx  |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 327a87f51d5a35d6dee0e9038b26f989052f6e0c
Author:     Caolán McNamara <[email protected]>
AuthorDate: Wed May 18 10:43:48 2022 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Fri Aug 26 22:44:56 2022 +0200

    tdf#124300 survive update all
    
    unsatisfactorily just route-one avoiding null derefs
    
    Change-Id: I66153f3a16d53f245d538c407c512557b5ececc1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134518
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sw/source/core/layout/findfrm.cxx 
b/sw/source/core/layout/findfrm.cxx
index 3d92f2a9ce0e..d6a70186231a 100644
--- a/sw/source/core/layout/findfrm.cxx
+++ b/sw/source/core/layout/findfrm.cxx
@@ -462,8 +462,8 @@ SwFootnoteBossFrame* SwFrame::FindFootnoteBossFrame( bool 
bFootnotes )
     SwFrame *pRet = this;
     // Footnote bosses can't exist inside a table; also sections with columns
     // don't contain footnote texts there
-    if( pRet->IsInTab() )
-        pRet = pRet->FindTabFrame();
+    if (SwFrame *pTabFrame = pRet->IsInTab() ? pRet->FindTabFrame() : nullptr)
+        pRet = pTabFrame;
 
     // tdf139336: put the footnotes into the page frame (instead of a column 
frame)
     // to avoid maximizing the section to the full page.... if:
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index a6204e4008fe..9cc83c1bfc18 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -1181,7 +1181,7 @@ const SwFootnoteFrame 
*SwFootnoteBossFrame::FindFirstFootnote( SwContentFrame co
             if ( pRet )
             {
                 const SwFootnoteBossFrame* pBoss = 
pRet->GetRef()->FindFootnoteBossFrame();
-                if( pBoss->GetPhyPageNum() != nPageNum ||
+                if( !pBoss || pBoss->GetPhyPageNum() != nPageNum ||
                     nColNum != lcl_ColumnNum( pBoss ) )
                     pRet = nullptr;
             }

Reply via email to