mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
Attempt to fix crash from script running too late
This commit is contained in:
parent
43cd543226
commit
67a06b3a74
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue