From ef2afda076774e3745e900968a7ec262013751fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Thu, 16 Aug 2001 11:11:35 +0000 Subject: [PATCH] safeguard against syntax errors when reading macros git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2524 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/formulamacro.C | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mathed/formulamacro.C b/src/mathed/formulamacro.C index bac2b2b092..bd0116c584 100644 --- a/src/mathed/formulamacro.C +++ b/src/mathed/formulamacro.C @@ -108,6 +108,8 @@ int InsetFormulaMacro::docBook(ostream & os) const void InsetFormulaMacro::read(LyXLex & lex) { MathMacroTemplate * t = mathed_parse_macro(lex); + if (!t) + t = new MathMacroTemplate("{parse error}", 0); MathMacroTable::insertTemplate(*t); setInsetName(t->name()); delete t;