[Libreoffice-commits] .: Branch 'libreoffice-3-5' - svl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Oct 1 02:11:34 PDT 2012


 svl/source/undo/undo.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit f5dce79d272b47886f16a422f985ee250d228649
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Jan 27 14:58:19 2012 +0100

    Do not move nCurUndoAction < 0.
    
    (Could easily happen when max undo steps is set to 1.)
    
    Signed-off-by: Michael Meeks <michael.meeks at suse.com>

diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index e3b8cd1..e61d695 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -658,7 +658,10 @@ bool SfxUndoManager::ImplAddUndoAction_NoNotify( SfxUndoAction *pAction, bool bT
         {
             i_guard.markForDeletion( m_pData->pActUndoArray->aUndoActions[0].pAction );
             m_pData->pActUndoArray->aUndoActions.Remove(0);
-            --m_pData->pActUndoArray->nCurUndoAction;
+            if (m_pData->pActUndoArray->nCurUndoAction > 0)
+            {
+                --m_pData->pActUndoArray->nCurUndoAction;
+            }
         }
     }
 


More information about the Libreoffice-commits mailing list