fix [#28672] Blender segfault after exiting a game that was opened with

autoplay on (Blender, not blenderplayer)

blender now stops the sound system and free's its self on Pythons
sys.exit().
This commit is contained in:
2011-09-20 12:22:19 +00:00
parent 78d4260144
commit 1657cbe61a
6 changed files with 101 additions and 10 deletions

View File

@@ -30,7 +30,7 @@
/* grr, python redefines */
#ifdef _POSIX_C_SOURCE
#undef _POSIX_C_SOURCE
# undef _POSIX_C_SOURCE
#endif
#include <Python.h>
@@ -241,6 +241,8 @@ void BPY_python_start(int argc, const char **argv)
pyrna_alloc_types();
BPY_atexit_init(); /* this can init any time */
#ifndef WITH_PYTHON_MODULE
py_tstate= PyGILState_GetThisThreadState();
PyEval_ReleaseThread(py_tstate);