diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index 2d4ba5f0fd..b846f93e67 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -53,6 +53,7 @@ #include "graphics/PreviewImage.h" #include "graphics/PreviewLoader.h" +#include "frontends/alert.h" #include "frontends/Painter.h" #include "support/lassert.h" @@ -1146,6 +1147,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('='))); diff --git a/status.16x b/status.16x index af17c8d551..db84a0401c 100644 --- a/status.16x +++ b/status.16x @@ -56,6 +56,9 @@ What's new * USER INTERFACE +- Fix crash when using a computer algebra system from within AMS math + environments (bug 7058). + - Fix insertion of a user math macro trough the math-insert lfun when a selection is present (bug 6939).