mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-05 13:26:21 +00:00
prevent crash in cursorX when row cache is empty
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8311 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
4ad759dbc4
commit
6c2ebc8c1a
@ -525,7 +525,7 @@ MathScriptInset::priv_dispatch(FuncRequest const & cmd,
|
||||
else
|
||||
limits_ = 0;
|
||||
} else if (limits_ == 0)
|
||||
limits_ = (hasLimits()) ? -1 : 1;
|
||||
limits_ = hasLimits() ? -1 : 1;
|
||||
else
|
||||
limits_ = 0;
|
||||
return DispatchResult(true, true);
|
||||
|
@ -1870,6 +1870,8 @@ int LyXText::cursorY() const
|
||||
int LyXText::cursorX(LyXCursor const & cur) const
|
||||
{
|
||||
ParagraphList::iterator pit = getPar(cur);
|
||||
if (pit->rows.empty())
|
||||
return 0;
|
||||
Row const & row = *pit->getRow(cur.pos());
|
||||
pos_type pos = cur.pos();
|
||||
pos_type cursor_vpos = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user