mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 09:25:31 +02:00
Merge pull request #7927 from zzmp/fix/script-timer-crash
fix crash on shutdown from script timers
This commit is contained in:
commit
232bd475df
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