mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
It's definitely not safe to continue in this case. The cursor is
invalid. So we should try to save the document before anything really bad happens.
This commit is contained in:
parent
8f663ea33e
commit
27af044a2d
@ -400,10 +400,12 @@ void Cursor::dispatch(FuncRequest const & cmd0)
|
|||||||
for (; depth(); pop(), boundary(false)) {
|
for (; depth(); pop(), boundary(false)) {
|
||||||
LYXERR(Debug::DEBUG, "Cursor::dispatch: cmd: "
|
LYXERR(Debug::DEBUG, "Cursor::dispatch: cmd: "
|
||||||
<< cmd0 << endl << *this);
|
<< cmd0 << endl << *this);
|
||||||
// LASSERT: Is it safe to continue here, or should we return?
|
|
||||||
LASSERT(pos() <= lastpos(), /**/);
|
// In any of these cases, the cursor is invalid, and we should
|
||||||
LASSERT(idx() <= lastidx(), /**/);
|
// try to save this document rather than crash.
|
||||||
LASSERT(pit() <= lastpit(), /**/);
|
LBUFERR(pos() <= lastpos());
|
||||||
|
LBUFERR(idx() <= lastidx());
|
||||||
|
LBUFERR(pit() <= lastpit());
|
||||||
|
|
||||||
// The common case is 'LFUN handled, need update', so make the
|
// The common case is 'LFUN handled, need update', so make the
|
||||||
// LFUN handler's life easier by assuming this as default value.
|
// LFUN handler's life easier by assuming this as default value.
|
||||||
|
Loading…
Reference in New Issue
Block a user