fix another crash

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16930 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2007-01-29 18:08:13 +00:00
parent 662d9e7d85
commit cc04805782

View 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;