mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
Merge pull request #16115 from sabrina-shanman/crash_shutdown_running-script
Attempt to fix crash from script running too late
This commit is contained in:
commit
f63fc15d4f
1 changed files with 7 additions and 1 deletions
|
@ -422,6 +422,12 @@ void ScriptEngine::waitTillDoneRunning() {
|
|||
if (isEvaluating()) {
|
||||
qCWarning(scriptengine) << "Script Engine has been running too long, aborting:" << getFilename();
|
||||
abortEvaluation();
|
||||
} else {
|
||||
auto context = currentContext();
|
||||
if (context) {
|
||||
qCWarning(scriptengine) << "Script Engine has been running too long, throwing:" << getFilename();
|
||||
context->throwError("Timed out during shutdown");
|
||||
}
|
||||
}
|
||||
|
||||
// Wait for the scripting thread to stop running, as
|
||||
|
@ -444,9 +450,9 @@ void ScriptEngine::waitTillDoneRunning() {
|
|||
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) {
|
||||
qCWarning(scriptengine) << "Script Engine has been running too long, throwing:" << getFilename();
|
||||
context->throwError("Timed out during shutdown");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue