Remove assertion that is not necessary.

It may happen that there are errors when doing undo, crashing does not
help in this case.

Fixes bug #12163.

(cherry picked from commit 3e3ad2937c)
This commit is contained in:
Jean-Marc Lasgouttes 2021-02-25 20:00:41 +01:00
parent 9a831200a4
commit cebdac4a6f
2 changed files with 2 additions and 1 deletions

View File

@ -464,7 +464,6 @@ void Undo::Private::doTextUndoOrRedo(CursorData & cur, UndoElementStack & stack,
ErrorList el; ErrorList el;
cap::switchBetweenClasses(olddc, buffer_.params().documentClassPtr(), cap::switchBetweenClasses(olddc, buffer_.params().documentClassPtr(),
static_cast<InsetText &>(buffer_.inset()), el); static_cast<InsetText &>(buffer_.inset()), el);
LATTEST(el.empty());
} else if (dit.inMathed()) { } else if (dit.inMathed()) {
// We stored the full cell here as there is not much to be // We stored the full cell here as there is not much to be
// gained by storing just 'a few' paragraphs (most if not // gained by storing just 'a few' paragraphs (most if not

View File

@ -92,6 +92,8 @@ What's new
- Fix coloring of text-mode material in math equations (bug 11007). - Fix coloring of text-mode material in math equations (bug 11007).
- Fix crash with undo when the document has errors (bug 12163).
* INTERNALS * INTERNALS