From 0e5369dcda371654ad9bf463ad4fd9bd6cc5ef03 Mon Sep 17 00:00:00 2001 From: Stephan Witt Date: Mon, 10 Jan 2011 10:23:10 +0000 Subject: [PATCH] #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 --- src/Cursor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cursor.cpp b/src/Cursor.cpp index f2a61c28cc..075577c783 100644 --- a/src/Cursor.cpp +++ b/src/Cursor.cpp @@ -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();