Crash with completion in mathed.

When deleting an inset, the stored DocIterator might contain a reference to a non-existent Inset and Text. Therefore, if we detect that the depth has changed, we are (for sure) not in the same paragraph, but we should make sure not to ask for the innerParagraph.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@28608 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-02-25 21:08:46 +00:00
parent ac85e637eb
commit 33228fba67
2 changed files with 5 additions and 0 deletions

View File

@ -2417,6 +2417,8 @@ bool samePar(DocIterator const & a, DocIterator const & b)
return true; return true;
if (a.empty() || b.empty()) if (a.empty() || b.empty())
return false; return false;
if (a.depth() != b.depth())
return false;
return &a.innerParagraph() == &b.innerParagraph(); return &a.innerParagraph() == &b.innerParagraph();
} }

View File

@ -185,6 +185,9 @@ What's new
- Fix a crash when removing the label of an included Program Listing. - Fix a crash when removing the label of an included Program Listing.
- Fix a crash when an unfinished macro is edited and deleted in math
mode (bug 5744).
- Ignore the master_buffer setting in Document>Settings if the current - Ignore the master_buffer setting in Document>Settings if the current
document is no real child. This fixes a crash when using the outliner document is no real child. This fixes a crash when using the outliner
in such files (bug 5653). in such files (bug 5653).