From: Jean-Marc Lasgouttes Date: Mon, 13 Apr 2020 10:02:26 +0000 (+0200) Subject: Fix embarassing crash caused by debug message X-Git-Tag: lyx-2.4.0dev-acb2ca7b~1014 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b5d6caac4149cc72cd5a734ffc8e9da1382bc9ee;p=features.git Fix embarassing crash caused by debug message After commit 6a936d63, the helpful debug message tries to display non-existing elements and crashes the program :( Fix by radical simplification of the message. Part of bug #11777. --- diff --git a/src/DocIterator.cpp b/src/DocIterator.cpp index bdad90f4fc..0f4bc10fac 100644 --- a/src/DocIterator.cpp +++ b/src/DocIterator.cpp @@ -633,11 +633,7 @@ void DocIterator::sanitize() for (size_t i = 0, n = sl.size(); i != n; ++i) { if (inset == nullptr) { // FIXME - LYXERR0(" Should not happen, but does e.g. after " - "C-n C-l C-z S-C-z\n" - << " or when a Buffer has been concurrently edited by two views" - << '\n' << "dit: " << *this << '\n' - << " lastpos: " << slices_[i].lastpos()); + LYXERR0("Null inset on cursor stack."); fixIfBroken(); break; }