#7209 avoid a crash in inMacroMode(): one cannot get the previous atom of an empty math cell

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37162 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Stephan Witt 2011-01-10 10:23:10 +00:00
parent af77fb5186
commit 0e5369dcda

View File

@ -1624,7 +1624,7 @@ bool Cursor::inMacroMode() const
{
if (!inMathed())
return false;
if (pos() == 0)
if (pos() == 0 || cell().empty())
return false;
InsetMathUnknown const * p = prevAtom()->asUnknownInset();
return p && !p->final();