mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-17 22:08:27 +02:00
better shutdown check for timer firings
This commit is contained in:
parent
41e90eda49
commit
c806f6cad2
1 changed files with 6 additions and 3 deletions
|
@ -1017,9 +1017,12 @@ 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
|
||||
{
|
||||
auto engine = DependencyManager::get<ScriptEngines>();
|
||||
if (!engine || engine->isStopped()) {
|
||||
qCDebug(scriptengine) << "Script.timerFired() while shutting down is ignored... parent script:" << getFilename();
|
||||
return; // bail early
|
||||
}
|
||||
}
|
||||
|
||||
QTimer* callingTimer = reinterpret_cast<QTimer*>(sender());
|
||||
|
|
Loading…
Reference in a new issue