From e4b165d729926692ae19c85b1596dfdaa74a15b9 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sun, 21 Oct 2018 17:27:44 +0200 Subject: tdf#120703 (PVS): redundant nullptr check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit V668 There is no sense in testing the 'pEffect' 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: I979915efb406d3173e03b4f47883e01fe0ca5d2d Reviewed-on: https://gerrit.libreoffice.org/62140 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sd/source/filter/ppt/ppt97animations.cxx | 5 ----- 1 file changed, 5 deletions(-) (limited to 'sd/source/filter') diff --git a/sd/source/filter/ppt/ppt97animations.cxx b/sd/source/filter/ppt/ppt97animations.cxx index f5729fcf1269..fe2f9010846e 100644 --- a/sd/source/filter/ppt/ppt97animations.cxx +++ b/sd/source/filter/ppt/ppt97animations.cxx @@ -581,11 +581,6 @@ void Ppt97Animation::createAndSetCustomAnimationEffect( SdrObject* pObj ) //1. ------ create an effect from the presets ------ ::sd::CustomAnimationEffectPtr pEffect( new ::sd::CustomAnimationEffect( pPreset->create( GetPresetSubType() ) ) ); - if( !pEffect.get() ) - { - DBG_ASSERT(pEffect.get(),"no suitable effect found"); - return; - } //2. ------ adapt the created effect ------ -- cgit v1.2.1