mirror of
https://github.com/overte-org/overte.git
synced 2025-04-17 09:16:53 +02:00
Prevent crash from script timers on shutdown
This commit is contained in:
parent
1c5e1bb5ea
commit
8025a3f14c
1 changed files with 5 additions and 0 deletions
|
@ -979,6 +979,11 @@ void ScriptEngine::updateMemoryCost(const qint64& deltaSize) {
|
|||
}
|
||||
|
||||
void ScriptEngine::timerFired() {
|
||||
if (DependencyManager::get<ScriptEngines>()->isStopped()) {
|
||||
qCDebug(scriptengine) << "Script.timerFired() while shutting down is ignored... parent script:" << getFilename();
|
||||
return; // bail early
|
||||
}
|
||||
|
||||
QTimer* callingTimer = reinterpret_cast<QTimer*>(sender());
|
||||
CallbackData timerData = _timerFunctionMap.value(callingTimer);
|
||||
|
||||
|
|
Loading…
Reference in a new issue