sd/source/ui/func/fuinsfil.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
New commits: commit f2c8180b7750e55807fe9d0e765e831ed2953c01 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sun Oct 21 21:59:54 2018 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Mon Oct 22 08:20:13 2018 +0200 tdf#120703 (PVS): redundant nullptr check V668 There is no sense in testing the 'pProgress' 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: Ida8c103e5f08d380e5c2de5bc5d269597bd32e30 Reviewed-on: https://gerrit.libreoffice.org/62151 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index 95882960479c..affbf5da2af8 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -626,8 +626,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium) mpDocSh->SetWaitCursor( false ); std::unique_ptr<SfxProgress> pProgress(new SfxProgress( mpDocSh, SdResId(STR_CREATE_PAGES), nNewPages)); - if( pProgress ) - pProgress->SetState( 0, 100 ); + pProgress->SetState( 0, 100 ); nNewPages = 0; @@ -659,8 +658,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium) if( Outliner::HasParaFlag( pSourcePara, ParaFlag::ISPAGE ) ) { nNewPages++; - if( pProgress ) - pProgress->SetState( nNewPages ); + pProgress->SetState( nNewPages ); } pSourcePara = pOutliner->GetParagraph( ++nPos ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits