]> git.lyx.org Git - lyx.git/blobdiff - src/Compare.cpp
Remove it for real now.
[lyx.git] / src / Compare.cpp
index aabbed7e3cd6228f61f94f3639fa6dab928befb4..92c5cf20bb97e91b69de664d51c42137528d1ef0 100644 (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());