diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-08-04 21:01:48 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-08-04 21:01:48 +0100 |
commit | 1f45a84af05d53c58c1bb5ceeec070eb8255ef75 (patch) | |
tree | 90612230a03e0cfb395b7eb3d04c38f2e7cffad1 | |
parent | 4275056a90eb9e178062276cc104ac2b94db13ca (diff) |
WaE: -Werror=maybe-uninitialized
Change-Id: I5063f7f6975d7aae8441e51a98e8b49642ed2970
-rw-r--r-- | sw/source/core/undo/rolbck.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index 153dc97d556f..ade03ff44331 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -1333,7 +1333,7 @@ void SwRegHistory::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) } else if (pOld && RES_ATTRSET_CHG == pNew->Which()) { - SwHistoryHint* pNewHstr; + SwHistoryHint* pNewHstr(0); const SfxItemSet& rSet = *static_cast< const SwAttrSetChg* >(pOld)->GetChgSet(); if ( 1 < rSet.Count() ) @@ -1352,7 +1352,8 @@ void SwRegHistory::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) } } - m_pHistory->m_SwpHstry.push_back( pNewHstr ); + if (pNewHstr) + m_pHistory->m_SwpHstry.push_back( pNewHstr ); } } } |