From 1c07c0dc38ec7bcf2d175f0ff0ee9421d29d46cf 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. (cherry picked from commit 522516d99eff64c0d1b339c951ef0e0d61a74394) --- src/DocIterator.cpp | 2 +- status.22x | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/DocIterator.cpp b/src/DocIterator.cpp index a059ad18d2..a3d81caadb 100644 --- a/src/DocIterator.cpp +++ b/src/DocIterator.cpp @@ -535,7 +535,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"); diff --git a/status.22x b/status.22x index 4a56ac4565..21afca7697 100644 --- a/status.22x +++ b/status.22x @@ -79,6 +79,8 @@ What's new - Fix potential crash when cursor enters an inset (bug 10691). +- Fix random crash when dissolving inset (bug 10667). + - Avoid a case of stuck cursor after entering an inset (bug 10630). -- 2.39.5