summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-12-15 21:21:38 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-12-16 09:13:14 +0000
commitf4b7650ecd46e5404b35dccfb8b7d3b0a385d633 (patch)
tree1d5fe4ed7cebb1d2cb9fe668c5fbe211dba54dd6 /sw
parente88cd210690b9d14101d5800bbbf8422a9e12d3e (diff)
coverity#1397207 Dereference before null check
Change-Id: I2578d59e98a2b1b040d9284b0ad0f68fd331d0df (cherry picked from commit 7a9d5485a815af26c63790e3165477c68e164117)
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/draw/dcontact.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index ded98a2114a3..a62d9a4080d5 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -415,9 +415,9 @@ const SwAnchoredObject* SwFlyDrawContact::GetAnchoredObj( const SdrObject* _pSdr
const SwAnchoredObject* pRetAnchoredObj = nullptr;
- if ( _pSdrObj && dynamic_cast<const SwVirtFlyDrawObj*>( _pSdrObj) != nullptr )
+ if (const SwVirtFlyDrawObj* pFlyDrawObj = dynamic_cast<const SwVirtFlyDrawObj*>(_pSdrObj))
{
- pRetAnchoredObj = static_cast<const SwVirtFlyDrawObj*>(_pSdrObj)->GetFlyFrame();
+ pRetAnchoredObj = pFlyDrawObj->GetFlyFrame();
}
return pRetAnchoredObj;