mirror of
https://github.com/overte-org/overte.git
synced 2025-08-16 07:32:17 +02:00
Don't explicitly destroy ScriptEngine; move emit finished to logical location
When DependencyManager creates new ScriptEngine it will destroy old one on correct thread. Previous emit finished() location causes deferred delete of Agent while still in use.
This commit is contained in:
commit
ac43c40d73
2 changed files with 2 additions and 2 deletions
|
@ -497,6 +497,7 @@ void Agent::executeScript() {
|
|||
DependencyManager::destroy<RecordingScriptingInterface>();
|
||||
|
||||
setFinished(true);
|
||||
emit finished();
|
||||
}
|
||||
|
||||
QUuid Agent::getSessionUUID() const {
|
||||
|
@ -838,7 +839,6 @@ void Agent::aboutToFinish() {
|
|||
|
||||
// destroy all other created dependencies
|
||||
DependencyManager::destroy<ScriptCache>();
|
||||
DependencyManager::destroy<ScriptEngines>();
|
||||
|
||||
DependencyManager::destroy<ResourceCacheSharedItems>();
|
||||
DependencyManager::destroy<SoundCache>();
|
||||
|
|
|
@ -67,7 +67,7 @@ void ThreadedAssignment::setFinished(bool isFinished) {
|
|||
// call our virtual aboutToFinish method - this gives the ThreadedAssignment subclass a chance to cleanup
|
||||
aboutToFinish();
|
||||
|
||||
emit finished();
|
||||
//emit finished();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue