mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Make sure a pointer is valid before using it
This commit is contained in:
parent
d3c63f97c4
commit
615c733844
@ -1449,14 +1449,14 @@ bool Cursor::macroModeClose()
|
||||
else if (atom.nucleus()->nargs() > 0)
|
||||
atom.nucleus()->cell(0).append(selection);
|
||||
|
||||
if (in->currentMode() == Inset::TEXT_MODE
|
||||
if (in && in->currentMode() == Inset::TEXT_MODE
|
||||
&& atom.nucleus()->currentMode() == Inset::MATH_MODE
|
||||
&& name != from_ascii("ensuremath")) {
|
||||
MathAtom at(new InsetMathEnsureMath(buffer()));
|
||||
at.nucleus()->cell(0).push_back(atom);
|
||||
niceInsert(at);
|
||||
posForward();
|
||||
} else if (in->currentMode() == Inset::MATH_MODE
|
||||
} else if (in && in->currentMode() == Inset::MATH_MODE
|
||||
&& atom.nucleus()->currentMode() == Inset::TEXT_MODE
|
||||
&& name != from_ascii("text")) {
|
||||
MathAtom at = createInsetMath("text", buffer());
|
||||
|
Loading…
Reference in New Issue
Block a user