summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-04-14 13:58:14 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-04-14 14:14:36 +0200
commit0869895063bd528893707cb74c6cf4c461fef066 (patch)
treebf47ccc71145f3ee387a5dafbaab9bc86b47a008 /cui
parent4acae16f9252ada89fd530f1ca86edafc046bc07 (diff)
tdf#120703 PVS: Silence V522 warnings
V522 There might be dereferencing of a potential null pointer. Change-Id: Ie4bc74a734a6d5a73838a27e0d80cc8e51595839 Reviewed-on: https://gerrit.libreoffice.org/70730 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/tppattern.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx
index 0bb433f00c65..0a73dfdf3e52 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -392,7 +392,9 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ClickAddHdl_Impl, weld::Button&, void)
if(SfxItemState::SET == m_rOutAttrs.GetItemState(XATTR_FILLBITMAP, true, &pPoolItem))
{
- pEntry.reset(new XBitmapEntry(dynamic_cast<const XFillBitmapItem*>(pPoolItem)->GetGraphicObject(), aName));
+ auto pFillBmpItem = dynamic_cast<const XFillBitmapItem*>(pPoolItem);
+ assert(pFillBmpItem);
+ pEntry.reset(new XBitmapEntry(pFillBmpItem->GetGraphicObject(), aName));
}
else
assert(!"SvxPatternTabPage::ClickAddHdl_Impl(), XBitmapEntry* pEntry == nullptr ?");