mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Amend c2facb8c
Make sure the base of a script is not empty before accessing it.
This commit is contained in:
parent
52ce0ff49a
commit
bb2c1c3485
@ -2041,7 +2041,7 @@ bool Cursor::mathForward(bool word)
|
||||
while (pos() < lastpos() && mc == nextMath().mathClass());
|
||||
} else if (openable(nextAtom())) {
|
||||
InsetMathScript const * n = nextMath().asScriptInset();
|
||||
bool to_brace_deco = n
|
||||
bool to_brace_deco = n && !n->nuc().empty()
|
||||
&& n->nuc().back()->lyxCode() == MATH_DECORATION_CODE
|
||||
&& n->nuc().back()->mathClass() == MC_OP;
|
||||
// single step: try to enter the next inset
|
||||
@ -2095,7 +2095,7 @@ bool Cursor::mathBackward(bool word)
|
||||
}
|
||||
} else if (openable(prevAtom())) {
|
||||
InsetMathScript const * p = prevMath().asScriptInset();
|
||||
bool to_brace_deco = p
|
||||
bool to_brace_deco = p && !p->nuc().empty()
|
||||
&& p->nuc().back()->lyxCode() == MATH_DECORATION_CODE
|
||||
&& p->nuc().back()->mathClass() == MC_OP;
|
||||
// single step: try to enter the preceding inset
|
||||
|
Loading…
Reference in New Issue
Block a user