]> git.lyx.org Git - features.git/commitdiff
#7209 avoid a crash in inMacroMode(): one cannot get the previous atom of an empty...
authorStephan Witt <switt@lyx.org>
Mon, 10 Jan 2011 10:23:10 +0000 (10:23 +0000)
committerStephan Witt <switt@lyx.org>
Mon, 10 Jan 2011 10:23:10 +0000 (10:23 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37162 a592a061-630c-0410-9148-cb99ea01b6c8

src/Cursor.cpp

index f2a61c28cc1c90df04a71ed647af348e0cd115fe..075577c783cc69eb792c66ea59ea15ef3c84c12d 100644 (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();