From a86c829b48eb9d1f72b20088e1b983b9f27e0d86 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 1 Sep 2022 13:34:48 +0200 Subject: 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 --- sw/source/core/doc/tblcpy.cxx | 1 + 1 file changed, 1 insertion(+) 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 ); } -- cgit