]> git.lyx.org Git - features.git/commitdiff
Fix embarassing crash caused by debug message
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 13 Apr 2020 10:02:26 +0000 (12:02 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 13 Apr 2020 10:02:26 +0000 (12:02 +0200)
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.

src/DocIterator.cpp

index bdad90f4fc225d9f147044c95c5b13fb8f0f82ed..0f4bc10fac73a0e1fda35d8f4dcc9e044bfd2a9f 100644 (file)
@@ -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;
                }