sd/source/ui/view/drviews2.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 64046625553ecbfd9fe0661e5b6f48e283a909e0
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sun Apr 10 14:20:11 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Sun Apr 10 16:25:10 2022 +0200

    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 <caol...@redhat.com>

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);

Reply via email to