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/trunk@28596 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-02-25 00:39:55 +00:00
parent e2823ac4dc
commit 708e38ddb3

View File

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