filter/source/svg/svgexport.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
New commits: commit 47781b6733ed05c0f4ec1e0b6ab0b5d26f8415d9 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Fri Oct 18 00:50:22 2024 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri Oct 18 08:45:06 2024 +0200 tdf#163486: PVS: redundant nullptr check V668 There is no sense in testing the 'pCommentAction' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. Change-Id: I3fa6619f80edefd852693190ebf463f694c8b55c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175108 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Tested-by: Jenkins diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index b87b49e0bb57..492a36b8c707 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -2620,8 +2620,7 @@ void SVGFilter::implCreateObjectsFromBackground( const Reference< css::drawing:: const OUString sBgId = getIdForTiledBackground( sPageId, nChecksum ); OString sComment = sTiledBackgroundTag + " " + sBgId.toUtf8(); MetaCommentAction* pCommentAction = new MetaCommentAction( sComment ); - if( pCommentAction ) - aTiledMtf.AddAction( pCommentAction ); + aTiledMtf.AddAction( pCommentAction ); } } else if( bIsTiled && nType != MetaActionType::CLIPREGION )