sw/source/core/doc/doctxm.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 5763e9eab84259bf3924a3898e2ce8286b7395e2
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Sep 1 13:40:04 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Sep 1 16:04:26 2022 +0200

    cid#1513468 Dereference null return value
    
    add assert to keep coverity happy
    
    Change-Id: I9d9acb3883c4ed8950a018a3ed9a2ac7d591ca60
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139170
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index ee418e5f1d4e..157bbe1b84c1 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -913,8 +913,9 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
         {
             // determine page description of content before table-of-content
             SwNodeIndex aIdx( *pSectNd );
-            pDefaultPageDesc =
-                SwNodes::GoPrevious( &aIdx )->FindPageDesc();
+            SwContentNode* pTmp = SwNodes::GoPrevious( &aIdx );
+            assert(pTmp); // make coverity happy
+            pDefaultPageDesc = pTmp->FindPageDesc();
 
         }
         if ( !pDefaultPageDesc )

Reply via email to