mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-08 18:19:42 +00:00
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:
parent
10231c3538
commit
ef2afda076
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user