From 78490b45c771a4c9632b324922f2c8e83f06153b Mon Sep 17 00:00:00 2001
From: Caolán McNamara <caolanm@redhat.com>
Date: Sun, 21 Oct 2018 15:04:57 +0100
Subject: pvs-studio: V668 no sense testing against null as memory was
 allocated by new
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

category V668 complete

Change-Id: I986d4cb89a7c72d54d71ea01fc598a9958deee24
Reviewed-on: https://gerrit.libreoffice.org/62138
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
---
 cui/source/tabpages/tpbitmap.cxx | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

(limited to 'cui')

diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index e2a80c4d9473..d7af780b41aa 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -295,13 +295,10 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs )
     std::unique_ptr<GraphicObject> pGraphicObject;
     pGraphicObject.reset( new GraphicObject(aItem.GetGraphicObject()) );
 
-    if(pGraphicObject)
-    {
-        BitmapEx aBmpEx(pGraphicObject->GetGraphic().GetBitmapEx());
-        Size aTempBitmapSize = aBmpEx.GetSizePixel();
-        rBitmapSize = PixelToLogic( aTempBitmapSize, MapMode(MapUnit::Map100thMM));
-        CalculateBitmapPresetSize();
-    }
+    BitmapEx aBmpEx(pGraphicObject->GetGraphic().GetBitmapEx());
+    Size aTempBitmapSize = aBmpEx.GetSizePixel();
+    rBitmapSize = PixelToLogic( aTempBitmapSize, MapMode(MapUnit::Map100thMM));
+    CalculateBitmapPresetSize();
 
     bool bTiled = false; bool bStretched = false;
     if(rAttrs->GetItemState( XATTR_FILLBMP_TILE ) != SfxItemState::DONTCARE)
-- 
cgit