diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2013-08-06 06:05:32 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2013-08-06 06:05:32 +0400 |
commit | 98176b4e1e2e0e06208bff02c21595fcd678c358 (patch) | |
tree | 5a5a59dedda19d82c328d9c6541aa1a3a64a690c /source/gameengine | |
parent | b03bc88d215f8b42a2aee53dd9925ed341702542 (diff) |
BGE: Making sure the BlenderPlayer calls Py_Finalize().
Diffstat (limited to 'source/gameengine')
-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; } |