Author: switt
Date: Mon Jan 10 11:23:10 2011
New Revision: 37162
URL: http://www.lyx.org/trac/changeset/37162
Log:
#7209 avoid a crash in inMacroMode(): one cannot get the previous atom of an
empty math cell
Modified:
lyx-devel/trunk/src/Cursor.cpp
Modified: lyx-devel/trunk/src/Cursor.cpp
==============================================================================
--- lyx-devel/trunk/src/Cursor.cpp Mon Jan 10 10:44:55 2011 (r37161)
+++ lyx-devel/trunk/src/Cursor.cpp Mon Jan 10 11:23:10 2011 (r37162)
@@ -1624,7 +1624,7 @@
{
if (!inMathed())
return false;
- if (pos() == 0)
+ if (pos() == 0 || cell().empty())
return false;
InsetMathUnknown const * p = prevAtom()->asUnknownInset();
return p && !p->final();