[email protected] schreef:
Author: vfr
Date: Wed Feb 25 01:39:55 2009
New Revision: 28596
URL: http://www.lyx.org/trac/changeset/28596
Log:
Fix bug 5744: http://bugzilla.lyx.org/show_bug.cgi?id=5744.
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.
Modified:
lyx-devel/trunk/src/BufferView.cpp
Modified: lyx-devel/trunk/src/BufferView.cpp
URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/BufferView.cpp?rev=28596
==============================================================================
--- lyx-devel/trunk/src/BufferView.cpp (original)
+++ lyx-devel/trunk/src/BufferView.cpp Wed Feb 25 01:39:55 2009
@@ -2453,6 +2453,8 @@
return true;
if (a.empty() || b.empty())
return false;
+ if (a.depth() != b.depth())
+ return false;
return &a.innerParagraph() == &b.innerParagraph();
}
Also for branch ?
Vincent