diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-06 10:37:54 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-06 11:57:48 +0000 |
commit | 15d5ca2509b1eb60e3e7dd6d170d7074767aabb6 (patch) | |
tree | 05460571a47a8a5a4422b81c486df2d99d5c74a3 /sw | |
parent | coverity#704880 Dereference after null check (diff) | |
download | core-15d5ca2509b1eb60e3e7dd6d170d7074767aabb6.tar.gz core-15d5ca2509b1eb60e3e7dd6d170d7074767aabb6.zip |
coverity#704879 Dereference after null check
Change-Id: Id71bc28be456c4883aacd29b560e9ff7d566ff84
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/docnode/section.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index df34c73bd0d1..fecbeb6872b7 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -752,7 +752,7 @@ void SwSectionFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) switch( nWhich ) { case RES_ATTRSET_CHG: - if( GetDepends() ) + if (GetDepends() && pOld && pNew) { SfxItemSet* pNewSet = ((SwAttrSetChg*)pNew)->GetChgSet(); SfxItemSet* pOldSet = ((SwAttrSetChg*)pOld)->GetChgSet(); @@ -820,7 +820,7 @@ void SwSectionFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) return; // That's it! case RES_OBJECTDYING: - if( !GetDoc()->IsInDtor() && + if( !GetDoc()->IsInDtor() && pOld && ((SwPtrMsgPoolItem *)pOld)->pObject == (void*)GetRegisteredIn() ) { // My Parents will be destroyed, so get the Parent's Parent |