sd/source/ui/func/fupage.cxx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
New commits: commit b017c73efdaff0d4921ff17992e499f25bfb5f33 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Oct 7 09:42:36 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Oct 7 15:44:53 2019 +0200 cid#1454627 Dereference null return value Change-Id: Idc94a2a912d94a8208348a8d6151c6d7dfe3ccb9 Reviewed-on: https://gerrit.libreoffice.org/80352 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> 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 ) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits