safeguard against syntax errors when reading macros

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2524 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2001-08-16 11:11:35 +00:00
parent 10231c3538
commit ef2afda076

View File

@ -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;