summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-04-10 14:20:11 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-04-10 16:25:10 +0200
commit64046625553ecbfd9fe0661e5b6f48e283a909e0 (patch)
tree5c8db045c6e3829f2bb8466be8be5245368bd881 /sd
parenta08f9ed2341bc60faae6b86538661fea40417ace (diff)
cid#1503836 silence Dereference null return value
Change-Id: I11dae0872d1f4add67b59ffd9696134c1dd2dbea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132770 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/drviews2.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 2141cc9b1a3c..591b90afc3f4 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -598,8 +598,9 @@ public:
if (nSlot == SID_ATTR_FILL_COLOR)
{
// Merge the color parameters to the color itself.
- XFillColorItem aColorItem(
- *static_cast<const XFillColorItem*>(pArgs->GetItem(SID_ATTR_FILL_COLOR)));
+ const XFillColorItem* pColorItem = static_cast<const XFillColorItem*>(pArgs->GetItem(SID_ATTR_FILL_COLOR));
+ assert(pColorItem);
+ XFillColorItem aColorItem(*pColorItem);
if (pArgs->GetItemState(SID_ATTR_COLOR_THEME_INDEX, false, &pItem) == SfxItemState::SET)
{
auto pIntItem = static_cast<const SfxInt16Item*>(pItem);