]> git.lyx.org Git - lyx.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>
Fri, 17 Apr 2020 08:41:50 +0000 (10:41 +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.

(cherry picked from commit b5d6caac4149cc72cd5a734ffc8e9da1382bc9ee)

src/DocIterator.cpp

index 04a2a1dc7ff3a9da70ea4b38ec21cb68906778cd..ec85886657ffdbd5518e095f2437d5064b86943c 100644 (file)
@@ -623,11 +623,7 @@ void DocIterator::sanitize()
        for (size_t i = 0, n = sl.size(); i != n; ++i) {
                if (inset == 0) {
                        // 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;
                }