[Libreoffice-commits] core.git: sw/source

Caolán McNamara caolanm at redhat.com
Tue Aug 4 13:46:21 PDT 2015


 sw/source/core/undo/rolbck.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 1f45a84af05d53c58c1bb5ceeec070eb8255ef75
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Aug 4 21:01:48 2015 +0100

    WaE: -Werror=maybe-uninitialized
    
    Change-Id: I5063f7f6975d7aae8441e51a98e8b49642ed2970

diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index 153dc97..ade03ff 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 );
         }
     }
 }


More information about the Libreoffice-commits mailing list