From: Jean-Marc Lasgouttes Date: Mon, 9 Mar 2015 10:14:26 +0000 (+0100) Subject: Check that DocIterator::sanitize only adds editable insets X-Git-Tag: 2.2.0alpha1~1219 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=17e435c4;p=features.git Check that DocIterator::sanitize only adds editable insets This fixes the crash on ticket #9432, but the bug there has other causes. --- diff --git a/src/DocIterator.cpp b/src/DocIterator.cpp index 859aae9ddd..e574115c31 100644 --- a/src/DocIterator.cpp +++ b/src/DocIterator.cpp @@ -555,6 +555,11 @@ void DocIterator::sanitize() fixIfBroken(); break; } + if (!inset->editable()) { + LYXERR0("Inset found on cursor stack is not editable."); + fixIfBroken(); + break; + } push_back(sl[i]); top().inset_ = inset; if (fixIfBroken())