diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-09-01 13:34:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-09-01 18:36:26 +0200 |
commit | a86c829b48eb9d1f72b20088e1b983b9f27e0d86 (patch) | |
tree | 60fb7f883685dd2cacf9ce84b60f4306bb8a7642 | |
parent | 033e98dbe6aafd6719eb83ea4d2fc68110e195c9 (diff) |
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.grandin@collabora.co.uk>
-rw-r--r-- | sw/source/core/doc/tblcpy.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
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 ); } |