diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-01-27 14:58:19 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-01-27 15:04:26 +0100 |
commit | db59e4481614f58e111a86a1926e49fb523ebbae (patch) | |
tree | 90d7e1517edd4a5462478b51430e878bf67174d3 | |
parent | CppunitTest_sal_osl_file fails on Windows (diff) | |
download | core-db59e4481614f58e111a86a1926e49fb523ebbae.tar.gz core-db59e4481614f58e111a86a1926e49fb523ebbae.zip |
Do not move nCurUndoAction < 0.
(Could easily happen when max undo steps is set to 1.)
-rw-r--r-- | svl/source/undo/undo.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx index b3bd44099631..449b79a89e9d 100644 --- a/svl/source/undo/undo.cxx +++ b/svl/source/undo/undo.cxx @@ -654,7 +654,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; + } } } |