Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/python/BPY_interface.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/python/BPY_interface.c b/source/blender/python/BPY_interface.c
index 75ed8e086d9..8adaddf14c5 100644
--- a/source/blender/python/BPY_interface.c
+++ b/source/blender/python/BPY_interface.c
@@ -408,7 +408,8 @@ void BPY_rebuild_syspath( void )
PyObject *mod, *dict, *syspath;
char dirpath[FILE_MAX];
char *sdir = NULL;
-
+ PyGILState_STATE gilstate = PyGILState_Ensure();
+
mod = PyImport_ImportModule( "sys" );
if (!mod) {
printf("error: could not import python sys module. some modules may not import.\n");
@@ -454,7 +455,7 @@ void BPY_rebuild_syspath( void )
}
Py_DECREF(mod);
-
+ PyGILState_Release(gilstate);
}
/****************************************************************************