sw/source/core/doc/tblcpy.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit a86c829b48eb9d1f72b20088e1b983b9f27e0d86
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Sep 1 13:34:48 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Sep 1 18:36:26 2022 +0200

    cid#1513471 Dereference null return value
    
    coverity can't see that pCNd cannot be nullptr here, so add assert to
    keep it happy
    
    Change-Id: I9d834511b1fd29147a653525134f5617ae6698a7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139167
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx
index beea9fefd72c..bf9200cb0623 100644
--- a/sw/source/core/doc/tblcpy.cxx
+++ b/sw/source/core/doc/tblcpy.cxx
@@ -534,6 +534,7 @@ static void lcl_CpyBox( const SwTable& rCpyTable, const 
SwTableBox* pCpyBox,
         {
             SwPosition aMvPos( aInsIdx );
             SwContentNode* pCNd = SwNodes::GoPrevious( &aMvPos.nNode );
+            assert(pCNd); // keep coverity happy
             aMvPos.nContent.Assign( pCNd, pCNd->Len() );
             SwDoc::CorrAbs( aInsIdx, aEndNdIdx, aMvPos );
         }

Reply via email to