]> git.lyx.org Git - lyx.git/commitdiff
fix another crash
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Mon, 29 Jan 2007 18:08:13 +0000 (18:08 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Mon, 29 Jan 2007 18:08:13 +0000 (18:08 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16930 a592a061-630c-0410-9148-cb99ea01b6c8

src/text.C

index c9014934fb6b513981d180c4ca70ec95c1280f93..ce9e710fa8c34f8743c5cdc0c4a07155e4d17f79 100644 (file)
@@ -1711,7 +1711,9 @@ docstring LyXText::currentState(LCursor & cur)
        os << _(", Paragraph: ") << cur.pit();
        os << _(", Id: ") << par.id();
        os << _(", Position: ") << cur.pos();
-       if (!par.empty()) {
+       // FIXME: Why is the check for par.size() needed?
+       // We are called with cur.pos() == par.size() quite often.
+       if (!par.empty() && cur.pos() < par.size()) {
                // Force output of code point, not character
                size_t const c = par.getChar(cur.pos());
                os << _(", Char: 0x") << std::hex << c;