diff options
Diffstat (limited to 'cui/source/tabpages/tppattern.cxx')
-rw-r--r-- | cui/source/tabpages/tppattern.cxx | 4 |
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 ?"); |