mirror of
https://github.com/overte-org/overte.git
synced 2025-04-12 02:19:32 +02:00
Merge pull request #8696 from howard-stearns/check-timers-during-shutdown
fix crash in scripted timer on shutdown
This commit is contained in:
commit
4c5bf3119e
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