From 522516d99eff64c0d1b339c951ef0e0d61a74394 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 15 Jun 2017 11:49:49 +0200 Subject: [PATCH] Make fixIfBroken() more robust Chop slice when its inset is not editable. Fixes bug #10667. --- src/DocIterator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DocIterator.cpp b/src/DocIterator.cpp index 51b44d88ef..3d9bd6892b 100644 --- a/src/DocIterator.cpp +++ b/src/DocIterator.cpp @@ -562,7 +562,7 @@ bool DocIterator::fixIfBroken() size_t n = slices_.size(); for (; i != n; ++i) { CursorSlice & cs = slices_[i]; - if (&cs.inset() != inset) { + if (&cs.inset() != inset || !cs.inset().editable()) { // the whole slice is wrong, chop off this as well --i; LYXERR(Debug::DEBUG, "fixIfBroken(): inset changed");