diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-04 10:07:23 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-04 11:11:00 +0000 |
commit | e93b9dc3db1190f26dd70e5f446adabcdbe8de48 (patch) | |
tree | 307b09c92996c0ae655aaa896277844fe321d2a4 | |
parent | 659b3b092ec2ff6cdee79a0490598a332b376a73 (diff) |
coverity#735915 Dereference after null check
Change-Id: Iaf27a27548c008b4c51a0e187570aa298fd56d7c
-rw-r--r-- | sw/source/core/text/txtfrm.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index cc22073131c5..add339ade792 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -1114,9 +1114,9 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) nPos = static_cast<const SwFmtFld*>(pItem)->GetTxtFld()->GetStart(); if( IsIdxInside( nPos, 1 ) ) { - const SfxPoolItem& rOldItem = - static_cast<const SwAttrSetChg*>(pOld)->GetChgSet()->Get( RES_TXTATR_FIELD ); - if( pItem == &rOldItem ) + const SfxPoolItem* pOldItem = pOld ? + &(static_cast<const SwAttrSetChg*>(pOld)->GetChgSet()->Get(RES_TXTATR_FIELD)) : NULL; + if( pItem == pOldItem ) { InvalidatePage(); SetCompletePaint(); |