mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-09 18:52:46 +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)
|
void InsetFormulaMacro::read(LyXLex & lex)
|
||||||
{
|
{
|
||||||
MathMacroTemplate * t = mathed_parse_macro(lex);
|
MathMacroTemplate * t = mathed_parse_macro(lex);
|
||||||
|
if (!t)
|
||||||
|
t = new MathMacroTemplate("{parse error}", 0);
|
||||||
MathMacroTable::insertTemplate(*t);
|
MathMacroTable::insertTemplate(*t);
|
||||||
setInsetName(t->name());
|
setInsetName(t->name());
|
||||||
delete t;
|
delete t;
|
||||||
|
Loading…
Reference in New Issue
Block a user