Kaydet (Commit) 6af96092 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1398369 Unchecked dynamic_cast

Change-Id: I33b5a2343eb7701a478c8d039d818e679471d4c0
üst fb92ec82
......@@ -587,7 +587,7 @@ void SwFlyDrawContact::SwClientNotify(const SwModify& rMod, const SfxHint& rHint
// This also needs to work when no layout exists. Thus, for
// FlyFrames an alternative method is used now in that case.
auto pFormat(dynamic_cast<const SwFrameFormat*>(&rMod));
if(pFormat->Which() == RES_FLYFRMFMT && !pFormat->getIDocumentLayoutAccess().GetCurrentViewShell())
if (pFormat && pFormat->Which() == RES_FLYFRMFMT && !pFormat->getIDocumentLayoutAccess().GetCurrentViewShell())
pGetZOrdnerHint->m_rnZOrder = GetMaster()->GetOrdNum();
}
}
......@@ -598,9 +598,9 @@ bool CheckControlLayer( const SdrObject *pObj )
{
if ( SdrInventor::FmForm == pObj->GetObjInventor() )
return true;
if (const SdrObjList *pObjLst = dynamic_cast<const SdrObjGroup*>(pObj))
if (const SdrObjGroup *pObjGroup = dynamic_cast<const SdrObjGroup*>(pObj))
{
const SdrObjList *pLst = pObjLst->GetSubList();
const SdrObjList *pLst = pObjGroup->GetSubList();
for ( size_t i = 0; i < pLst->GetObjCount(); ++i )
{
if ( ::CheckControlLayer( pLst->GetObj( i ) ) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment