BGE: Making sure the BlenderPlayer calls Py_Finalize().

This commit is contained in:
Mitchell Stokes 2013-08-06 02:05:32 +00:00
parent b03bc88d21
commit 98176b4e1e

@ -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;
}