[LyX/2.3.x] Remove assertion that is not necessary.

Jean-Marc Lasgouttes lasgouttes at lyx.org
Mon Mar 1 11:14:14 UTC 2021


commit cebdac4a6f759f05012c5d6bf1d58743787a0066
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date:   Thu Feb 25 20:00:41 2021 +0100

    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 3e3ad2937cbb26724eb5c898b905f882df8e3a63)
---
 src/Undo.cpp |    1 -
 status.23x   |    2 ++
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/Undo.cpp b/src/Undo.cpp
index 33ab923..0425d2c 100644
--- a/src/Undo.cpp
+++ b/src/Undo.cpp
@@ -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
diff --git a/status.23x b/status.23x
index 0120c49..2b994ea 100644
--- a/status.23x
+++ b/status.23x
@@ -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
 


More information about the lyx-cvs mailing list