diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-12 10:22:49 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-12 11:02:16 +0000 |
commit | 936bcd6f9aafecc0db05e51e52ce6400812f3d37 (patch) | |
tree | 66e3d09c484fc1b541979eac5fa3195df614817b | |
parent | 31d620abf59f54e603d86aea198770a0aeb489b0 (diff) |
coverity#705461 Dereference null return value
Change-Id: Icc9dac3f198432f0b548cbe9c559658ee26ba1cc
-rw-r--r-- | cui/source/tabpages/backgrnd.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index c2c707748968..828529de524a 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -1016,8 +1016,10 @@ sal_Bool SvxBackgroundTabPage::FillItemSetWithWallpaperItem( SfxItemSet& rCoreSe { sal_uInt16 nWhich = GetWhich( nSlot ); const SfxPoolItem* pOld = GetOldItem( rCoreSet, nSlot ); - const SfxItemSet& rOldSet = GetItemSet(); DBG_ASSERT(pOld,"FillItemSetWithWallpaperItem: Item not found"); + if (!pOld) + return sal_False; + const SfxItemSet& rOldSet = GetItemSet(); SvxBrushItem rOldItem( (const CntWallpaperItem&)*pOld, nWhich ); SvxGraphicPosition eOldPos = rOldItem.GetGraphicPos(); |