DEPM crash fix

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8049 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Alfredo Braunstein 2003-11-05 21:47:25 +00:00
parent 505cba7cad
commit 969e350579
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2003-11-05 Alfredo Braunstein <abraunst@libero.it>
* text2.C (deleteEmptyParagraphMechanism): fix n-th crash
2003-11-05 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* output_linuxdoc.h:

View File

@ -1819,8 +1819,12 @@ bool LyXText::deleteEmptyParagraphMechanism(LyXCursor const & old_cursor)
recUndo(parOffset(old_pit), parOffset(endpit) - 1);
cursor = tmpcursor;
// cache cursor pit
ParagraphList::iterator tmppit = cursorPar();
// delete old par
ownerParagraphs().erase(old_pit);
// update cursor par offset
cursor.par(parOffset(tmppit));
redoParagraph();
// correct cursor y