summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-06 20:31:49 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-01-07 00:04:51 +0000
commit6af9609284e33c9a8501cbda9ef4c82f30a16b41 (patch)
tree17e1b635264330d2d35f835bc8cfa75caefdd76e /sw
parentfb92ec82caa96f2ddf4ab4bca8c51503ae9fba82 (diff)
coverity#1398369 Unchecked dynamic_cast
Change-Id: I33b5a2343eb7701a478c8d039d818e679471d4c0
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/draw/dcontact.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 06e9f66915f8..c0755c057966 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -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 ) ) )