]> git.lyx.org Git - lyx.git/commitdiff
Remove assertion that is not necessary.
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 25 Feb 2021 19:00:41 +0000 (20:00 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 1 Mar 2021 11:01:15 +0000 (12:01 +0100)
It may happen that there are errors when doing undo, crashing does not
help in this case.

Fixes bug #12163.

(cherry picked from commit 3e3ad2937cbb26724eb5c898b905f882df8e3a63)

src/Undo.cpp
status.23x

index 33ab923e17f9b18cd5e733936e108c0a536e2c10..0425d2c0d64316d8c3803c05c81c8e70c7f586e6 100644 (file)
@@ -464,7 +464,6 @@ void Undo::Private::doTextUndoOrRedo(CursorData & cur, UndoElementStack & stack,
                ErrorList el;
                cap::switchBetweenClasses(olddc, buffer_.params().documentClassPtr(),
                        static_cast<InsetText &>(buffer_.inset()), el);
-               LATTEST(el.empty());
        } else if (dit.inMathed()) {
                // We stored the full cell here as there is not much to be
                // gained by storing just 'a few' paragraphs (most if not
index 0120c499ee577b6c12675d973eb5bb04b1c538af..2b994ea9d05470208bb6103def290c8045c9afd8 100644 (file)
@@ -92,6 +92,8 @@ What's new
 
 - Fix coloring of text-mode material in math equations (bug 11007).
 
+- Fix crash with undo when the document has errors (bug 12163).
+
 
 * INTERNALS