Do not crash with empty (invalid) math environments (part of #8359)

This commit is contained in:
Juergen Spitzmueller 2014-02-10 09:24:14 +01:00
parent adc78fac32
commit 6a3ef6a134
2 changed files with 13 additions and 0 deletions

View File

@ -1478,6 +1478,13 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
else if (t.cs() == "begin") {
docstring const name = getArg('{', '}');
if (name.empty()) {
success_ = false;
error("found invalid environment");
return success_;
}
environments_.push_back(name);
if (name == "array" || name == "subarray") {

View File

@ -52,6 +52,9 @@ What's new
* DOCUMENT INPUT/OUTPUT
- Do not crash when loading documents with empty (invalid) math environments
(part of bug 8359).
- Rerun makeindex if all nomencl entries have been removed (bug 8905).
@ -66,6 +69,9 @@ What's new
- Fix crash when optional argument inside a math macro was deleted (bug 8329).
- Fix math-ams-matrix function that could corrupt documents if not used properly
(part of bug 8359).
- Fix problem that led to assertion in some cases when space was at
beginning of line (bugs 8838 and 8947).