]> git.lyx.org Git - lyx.git/blobdiff - src/Cursor.cpp
When we use InPremable styles, we want to write as many versions
[lyx.git] / src / Cursor.cpp
index 8d94ddf5de7e84bc04b9f199b90e59d782287a8b..26aeabf1d5dc45a399f0d1ce68fad6ec6fbe7184 100644 (file)
@@ -1046,8 +1046,11 @@ CursorSlice Cursor::normalAnchor() const
        // LASSERT: There have been several bugs around this code, that seem
        // to involve failures to reset the anchor. We can at least not crash
        // in release mode by resetting it ourselves.
-       LASSERT(anchor_.depth() >= depth(),
-               const_cast<DocIterator &>(anchor_) = *this);
+       if (anchor_.depth() < depth()) {
+               LYXERR0("Cursor is deeper than anchor. PLEASE REPORT.\nCursor is"
+                       << *this);
+               const_cast<DocIterator &>(anchor_) = *this;
+       }
 
        CursorSlice normal = anchor_[depth() - 1];
        if (depth() < anchor_.depth() && top() <= normal) {