summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-10-07 09:42:36 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-10-07 15:44:53 +0200
commitb017c73efdaff0d4921ff17992e499f25bfb5f33 (patch)
treed2a529191aeb8cc7e25ac39a46352e6361f73e58 /sd
parentc8bf651fb9b97eca6af7d1d26c62681cc5c7ec0f (diff)
cid#1454627 Dereference null return value
Change-Id: Idc94a2a912d94a8208348a8d6151c6d7dfe3ccb9 Reviewed-on: https://gerrit.libreoffice.org/80352 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/func/fupage.cxx14
1 files changed, 11 insertions, 3 deletions
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index 22db66ea7189..d4fc56c5fdda 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -372,10 +372,18 @@ const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent, const SfxRequest&
// if the background for this page was set to invisible, the background-object has to be deleted, too.
const XFillStyleItem* pTempFillStyleItem = pTempSet->GetItem<XFillStyleItem>(XATTR_FILLSTYLE);
assert(pTempFillStyleItem);
- if( ( pTempFillStyleItem->GetValue() == drawing::FillStyle_NONE ) ||
- ( ( pTempSet->GetItemState( XATTR_FILLSTYLE ) == SfxItemState::DEFAULT ) &&
- ( aMergedAttr.GetItem<XFillStyleItem>( XATTR_FILLSTYLE )->GetValue() == drawing::FillStyle_NONE ) ) )
+ if (pTempFillStyleItem->GetValue() == drawing::FillStyle_NONE)
mbPageBckgrdDeleted = true;
+ else
+ {
+ if (pTempSet->GetItemState(XATTR_FILLSTYLE) == SfxItemState::DEFAULT)
+ {
+ const XFillStyleItem* pMergedFillStyleItem = aMergedAttr.GetItem<XFillStyleItem>(XATTR_FILLSTYLE);
+ assert(pMergedFillStyleItem);
+ if (pMergedFillStyleItem->GetValue() == drawing::FillStyle_NONE)
+ mbPageBckgrdDeleted = true;
+ }
+ }
if( !mbMasterPage && bChanges && mbPageBckgrdDeleted )
{