mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 01:17:14 +02:00
Merge pull request #4574 from ZappoMan/crashOnExit
fix crash on shutdown related to entity scripts connecting to signals
This commit is contained in:
commit
b537625e59
2 changed files with 4 additions and 0 deletions
|
@ -567,6 +567,9 @@ void Application::aboutToQuit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::cleanupBeforeQuit() {
|
void Application::cleanupBeforeQuit() {
|
||||||
|
|
||||||
|
_entities.clear(); // this will allow entity scripts to properly shutdown
|
||||||
|
|
||||||
_datagramProcessor->shutdown(); // tell the datagram processor we're shutting down, so it can short circuit
|
_datagramProcessor->shutdown(); // tell the datagram processor we're shutting down, so it can short circuit
|
||||||
_entities.shutdown(); // tell the entities system we're shutting down, so it will stop running scripts
|
_entities.shutdown(); // tell the entities system we're shutting down, so it will stop running scripts
|
||||||
ScriptEngine::stopAllScripts(this); // stop all currently running global scripts
|
ScriptEngine::stopAllScripts(this); // stop all currently running global scripts
|
||||||
|
|
|
@ -107,6 +107,7 @@ void EntityTreeRenderer::init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntityTreeRenderer::shutdown() {
|
void EntityTreeRenderer::shutdown() {
|
||||||
|
_entitiesScriptEngine->disconnect(); // disconnect all slots/signals from the script engine
|
||||||
_shuttingDown = true;
|
_shuttingDown = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue