[Libreoffice-commits] core.git: sd/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Oct 22 06:20:34 UTC 2018
sd/source/ui/func/fuinsfil.cxx | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
New commits:
commit f2c8180b7750e55807fe9d0e765e831ed2953c01
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sun Oct 21 21:59:54 2018 +0200
Commit: Mike Kaganski <mike.kaganski at 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.kaganski at 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 );
More information about the Libreoffice-commits
mailing list