Try to fix an assert coming from "gcc vector-index checks".

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33052 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2010-01-16 00:22:15 +00:00
parent ff93b826e1
commit ec96bbe429

View File

@ -444,6 +444,13 @@ static bool equal(Inset const * i_o, Inset const * i_n)
static bool equal(DocIterator & o, DocIterator & n) {
// Explicitly check for this, so we won't call
// Paragraph::getChar for the last pos.
bool const o_lastpos = o.pos() == o.lastpos();
bool const n_lastpos = n.pos() == n.lastpos();
if (o_lastpos || n_lastpos)
return o_lastpos && n_lastpos;
Paragraph const & old_par = o.text()->getPar(o.pit());
Paragraph const & new_par = n.text()->getPar(n.pit());