mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fix a crash with uninitialized buffer member of MathData
See the details here: https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg210294.html
(cherry picked from commit 59fa0b2592
)
This commit is contained in:
parent
006029267d
commit
2bf2294697
@ -1232,10 +1232,12 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
|
|||||||
cur.recordUndoSelection();
|
cur.recordUndoSelection();
|
||||||
if (cmd.argument() == "^" || cmd.argument() == "_")
|
if (cmd.argument() == "^" || cmd.argument() == "_")
|
||||||
interpretChar(cur, cmd.argument()[0]);
|
interpretChar(cur, cmd.argument()[0]);
|
||||||
|
else if (!cur.selection())
|
||||||
|
cur.niceInsert(cmd.argument());
|
||||||
else {
|
else {
|
||||||
MathData ar;
|
MathData ar(cur.buffer());
|
||||||
asArray(cmd.argument(), ar);
|
asArray(cmd.argument(), ar);
|
||||||
if (cur.selection() && ar.size() == 1
|
if (ar.size() == 1
|
||||||
&& ar[0]->asNestInset()
|
&& ar[0]->asNestInset()
|
||||||
&& ar[0]->asNestInset()->nargs() > 1)
|
&& ar[0]->asNestInset()->nargs() > 1)
|
||||||
handleNest(cur, ar[0]);
|
handleNest(cur, ar[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user