summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-07-22 11:33:19 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-07-22 16:25:39 +0200
commite1042be85252483dc33efb0f35ac267ac24ecf67 (patch)
treec3b91d762ec58d92393836d76041714667b7ba70
parent11a99e0efebe621691aa54ab07844aa22a2ad283 (diff)
cid#1448269 Dereference null return value
Change-Id: Ief2dfb8a87030d992a867a7a9014d3787e201831 Reviewed-on: https://gerrit.libreoffice.org/76111 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sd/source/ui/view/drviews7.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 801a70d2042a..f69c566021f2 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -1698,7 +1698,11 @@ void DrawViewShell::GetPageProperties( SfxItemSet &rSet )
rSet.Put(aPageItem);
const SfxItemSet &rPageAttr = pPage->getSdrPageProperties().GetItemSet();
- drawing::FillStyle eXFS = rPageAttr.GetItem( XATTR_FILLSTYLE )->GetValue();
+ const XFillStyleItem* pFillStyle = rPageAttr.GetItem(XATTR_FILLSTYLE);
+ if (!pFillStyle)
+ return;
+
+ drawing::FillStyle eXFS = pFillStyle->GetValue();
XFillStyleItem aFillStyleItem( eXFS );
aFillStyleItem.SetWhich( SID_ATTR_PAGE_FILLSTYLE );
rSet.Put(aFillStyleItem);