diff options
Diffstat (limited to 'source/gameengine/GamePlayer/ghost/GPG_Application.cpp')
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_Application.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp index 6f7a87804dc..c3cbf381af4 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp @@ -792,9 +792,6 @@ void GPG_Application::stopEngine() } m_pyGlobalDictString_Length = saveGamePythonConfig(&m_pyGlobalDictString); - - // when exiting the mainloop - exitGamePythonScripting(); #endif m_ketsjiengine->StopEngine(); @@ -808,6 +805,7 @@ void GPG_Application::stopEngine() m_system->removeTimer(m_frameTimer); m_frameTimer = 0; } + m_engineRunning = false; } @@ -885,6 +883,11 @@ void GPG_Application::exitEngine() GPU_extensions_exit(); +#ifdef WITH_PYTHON + // Call this after we're sure nothing needs Python anymore (e.g., destructors) + exitGamePlayerPythonScripting(); +#endif + m_exitRequested = 0; m_engineInitialized = false; } |