diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-08-07 16:20:44 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-08-07 18:00:53 +0100 |
commit | 539a0d00f9463412ab714ecc606118b6f4b08580 (patch) | |
tree | e3d1c9f093614164a6e1cf4dec068069bc63b7e6 /sw | |
parent | 39790317a9edb85cf25244dc112c4a2ffe473b26 (diff) |
coverity#704901 Dereference after null check
Change-Id: I1545151a71b44d85bbf1e990837154e4e1b6f3c4
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/layout/fly.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index 2e4fd017ecbc..bcf92090f2a9 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -985,7 +985,7 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, case RES_URL: // The interface changes the frame size when interacting with text frames, // the Map, however, needs to be relative to FrmSize(). - if ( (!Lower() || !Lower()->IsNoTxtFrm()) && + if ( (!Lower() || !Lower()->IsNoTxtFrm()) && pNew && pOld && ((SwFmtURL*)pNew)->GetMap() && ((SwFmtURL*)pOld)->GetMap() ) { const SwFmtFrmSize &rSz = GetFmt()->GetFrmSize(); @@ -1006,6 +1006,7 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, break; case RES_CHAIN: + if (pNew) { SwFmtChain *pChain = (SwFmtChain*)pNew; if ( pChain->GetNext() ) |