mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 22:41:09 +00:00
Amend [2dcb7300/lyxgit]
Avoid a crash by checking that a cell is not empty before accessing its content.
This commit is contained in:
parent
71dfcb18b9
commit
b3cba2a09c
@ -1113,10 +1113,10 @@ void InsetMathMacro::write(WriteStream & os) const
|
||||
// delimiter-size-modifier macro (see #10497 and #11346)
|
||||
bool braced = false;
|
||||
size_type last = cell(i).size() - 1;
|
||||
if (cell(i)[last].nucleus()->asUnknownInset()) {
|
||||
if (cell(i).size() && cell(i)[last].nucleus()->asUnknownInset()) {
|
||||
latexkeys const * l = in_word_set(cell(i)[last].nucleus()->name());
|
||||
braced = (l && l->inset == "big");
|
||||
} else if (cell(i)[0].nucleus()->asScriptInset()) {
|
||||
} else if (cell(i).size() && cell(i)[0].nucleus()->asScriptInset()) {
|
||||
braced = cell(i)[0].nucleus()->asScriptInset()->nuc().empty();
|
||||
}
|
||||
if (braced)
|
||||
|
Loading…
Reference in New Issue
Block a user