diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-08-03 20:27:16 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-08-03 20:33:48 +0100 |
commit | cd47929a6d161a99fb89bc91e776895ca2054b88 (patch) | |
tree | 9712ad99f14b7945335f8e9ca24d63732fdf1528 /sw | |
parent | 0b8d81e8b3da081ebdb1ae7fed7b20a51322f951 (diff) |
coverity#1314997 Dereference null return value
Change-Id: If0c60ec2dcdf95a0aec7f0c9561142fee4cd30c4
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/undo/rolbck.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index e98414af5172..153dc97d556f 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -1340,10 +1340,8 @@ void SwRegHistory::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) { pNewHstr = new SwHistorySetAttrSet( rSet, m_nNodeIndex, m_WhichIdSet ); } - else + else if (const SfxPoolItem* pItem = SfxItemIter( rSet ).FirstItem()) { - const SfxPoolItem* pItem = SfxItemIter( rSet ).FirstItem(); - if ( m_WhichIdSet.count( pItem->Which() ) ) { pNewHstr = new SwHistorySetFormat( pItem, m_nNodeIndex ); |