diff --git a/Code/Mantid/MantidPlot/src/Script.cpp b/Code/Mantid/MantidPlot/src/Script.cpp index 56c69fe4028b71ed0a0334177616bf74bc2777a4..7a0a4376d36396d0638e1b871c8e3e9378e275e5 100644 --- a/Code/Mantid/MantidPlot/src/Script.cpp +++ b/Code/Mantid/MantidPlot/src/Script.cpp @@ -161,7 +161,7 @@ QFuture<bool> Script::executeAsync(const ScriptCode & code) /// Request that this script be aborted void Script::abort() { - this->abortImpl(); + if(isExecuting()) this->abortImpl(); } /** @@ -202,4 +202,3 @@ QString Script::normaliseLineEndings(QString text) const text = text.replace(QRegExp("\\r"), QString("\n")); return text; } -