summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-08-03 20:25:49 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-08-03 20:33:48 +0100
commit0b8d81e8b3da081ebdb1ae7fed7b20a51322f951 (patch)
tree34c59d9dec54df8eefba5d39aa960b87e34afa49
parent11969c48a670c8e47ea4fa5b9d68c877fad50463 (diff)
coverity#1314998 Dereference null return value
Change-Id: I1f36c486b404d189f2f39a525ec3fd2e1710e7af
-rw-r--r--sw/source/core/undo/rolbck.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index 2d2bced5d62b..e98414af5172 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -1442,13 +1442,14 @@ void SwRegHistory::_MakeSetWhichIds()
if( pSet && pSet->Count() )
{
SfxItemIter aIter( *pSet );
- sal_uInt16 nW = aIter.FirstItem()->Which();
- while( true )
+ const SfxPoolItem* pItem = aIter.FirstItem();
+ while(pItem)
{
+ sal_uInt16 nW = pItem->Which();
m_WhichIdSet.insert( nW );
if( aIter.IsAtEnd() )
break;
- nW = aIter.NextItem()->Which();
+ pItem = aIter.NextItem();
}
}
}