Attempt to fix crash from script running too late

This commit is contained in:
sabrina-shanman 2019-08-28 14:28:12 -07:00
parent 43cd543226
commit 67a06b3a74

View file

@ -422,6 +422,12 @@ void ScriptEngine::waitTillDoneRunning() {
if (isEvaluating()) {
qCWarning(scriptengine) << "Script Engine has been running too long, aborting:" << getFilename();
abortEvaluation();
} else {
qCWarning(scriptengine) << "Script Engine has been running too long, throwing:" << getFilename();
auto context = currentContext();
if (context) {
context->throwError("Timed out during shutdown");
}
}
// Wait for the scripting thread to stop running, as