commit 58b3971eeb417d9209ad888b7347c54eb40e90c9
Author: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date:   Wed Mar 11 16:55:51 2015 +0100

    Avoid crash with after a params undo.
    
    When doing a non-atomic undo, one should not try to merge with a previous 
params undo.
    
    This fixes bug #7740.

diff --git a/src/Undo.cpp b/src/Undo.cpp
index b305ede..2a01c8b 100644
--- a/src/Undo.cpp
+++ b/src/Undo.cpp
@@ -121,7 +121,7 @@ struct UndoElement
        ParagraphList * pars;
        /// the contents of the saved MathData (for mathed)
        MathData * array;
-       /// Only used in case of full backups
+       /// Only used in case of params undo
        BufferParams const * bparams;
        /// Was the buffer clean at this point?
        bool lyx_clean;
@@ -321,6 +321,7 @@ void Undo::Private::doRecordUndo(UndoKind kind,
        if (!undo_finished_
            && kind != ATOMIC_UNDO
            && !stack.empty()
+           && !stack.top().bparams
            && samePar(stack.top().cell, cell)
            && stack.top().kind == kind
            && stack.top().from == from

Reply via email to