mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Fix bug #7058 (Crash when invoking CAS on a multiline AMS context)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36447 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
79514a3fcd
commit
d43cdfa5ef
@ -43,6 +43,7 @@
|
||||
#include "graphics/PreviewImage.h"
|
||||
#include "graphics/PreviewLoader.h"
|
||||
|
||||
#include "frontends/alert.h"
|
||||
#include "frontends/Painter.h"
|
||||
|
||||
#include "support/lassert.h"
|
||||
@ -1195,6 +1196,15 @@ void InsetMathHull::doExtern(Cursor & cur, FuncRequest & func)
|
||||
// return;
|
||||
//}
|
||||
|
||||
// only inline, display or eqnarray math is allowed
|
||||
if (getType() > hullEqnArray) {
|
||||
frontend::Alert::warning(_("Bad math environment"),
|
||||
_("Computation cannot be performed for AMS "
|
||||
"math environments.\nChange the math "
|
||||
"formula type and try again."));
|
||||
return;
|
||||
}
|
||||
|
||||
MathData eq;
|
||||
eq.push_back(MathAtom(new InsetMathChar('=')));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user