From: Jean-Marc Lasgouttes Date: Thu, 15 Jun 2017 09:49:49 +0000 (+0200) Subject: Make fixIfBroken() more robust X-Git-Tag: 2.2.4~109 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=1c07c0dc;p=features.git Make fixIfBroken() more robust Chop slice when its inset is not editable. Fixes bug #10667. (cherry picked from commit 522516d99eff64c0d1b339c951ef0e0d61a74394) --- 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).