Kaydet (Commit) f2c8180b authored tarafından Mike Kaganski's avatar Mike Kaganski

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: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst b979e718
......@@ -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 ) )
if( pProgress )
pProgress->SetState( nNewPages );
pProgress->SetState( nNewPages );
pSourcePara = pOutliner->GetParagraph( ++nPos );
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment