svl/source/undo/undo.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
New commits: commit 9471401da95e7b31785dfbe24597da5484e8c35d Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Oct 14 17:07:31 2024 +0200 Commit: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> CommitDate: Thu Nov 28 22:01:53 2024 +0100 tdf#157130 undo and track changes not restoring characters (macOS) Not sure about the real underlying issue here. In debug mode, we hit this assert. Changing it from an assert to a "do decrement mnEmptyMark if it would become negative" seems to help. Change-Id: Ie23a685552d2f8153b67e18f9c0203ecbaad0ede Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174905 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> (cherry picked from commit 148fa9e9405b143f9fc228d9b5f967cad3139967) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175493 Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx index 488a0538244f..f9256e0ab7e9 100644 --- a/svl/source/undo/undo.cxx +++ b/svl/source/undo/undo.cxx @@ -575,13 +575,9 @@ bool SfxUndoManager::ImplAddUndoAction_NoNotify( std::unique_ptr<SfxUndoAction> if (m_xData->pActUndoArray->nCurUndoAction > 0) { --m_xData->pActUndoArray->nCurUndoAction; + // fdo#66071 invalidate the current empty mark when removing + --m_xData->mnEmptyMark; } - else - { - assert(!"CurrentUndoAction going negative (!)"); - } - // fdo#66071 invalidate the current empty mark when removing - --m_xData->mnEmptyMark; } }