#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/branches/BRANCH_1_6_X@37163 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Stephan Witt 2011-01-10 10:31:20 +00:00
parent 536dc4479a
commit 96d0bb79ef
2 changed files with 4 additions and 1 deletions

View File

@ -1559,7 +1559,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();

View File

@ -178,6 +178,9 @@ What's new
- Don't allow to set an alignment for rows in math substack environments
(bug 2498).
- Fix crash when clicking on begin of unfinished command in math
when autocomplete is active (bug 7209).
* DOCUMENTATION AND LOCALIZATION