mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 08:56:25 +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()) {
|
if (isEvaluating()) {
|
||||||
qCWarning(scriptengine) << "Script Engine has been running too long, aborting:" << getFilename();
|
qCWarning(scriptengine) << "Script Engine has been running too long, aborting:" << getFilename();
|
||||||
abortEvaluation();
|
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
|
// Wait for the scripting thread to stop running, as
|
||||||
|
|
Loading…
Reference in a new issue