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:
Diffstat (limited to 'intern/mantaflow')
-rw-r--r--intern/mantaflow/intern/MANTA_main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/intern/mantaflow/intern/MANTA_main.cpp b/intern/mantaflow/intern/MANTA_main.cpp
index 0828fae5351..52d40407e0d 100644
--- a/intern/mantaflow/intern/MANTA_main.cpp
+++ b/intern/mantaflow/intern/MANTA_main.cpp
@@ -2028,10 +2028,14 @@ static PyObject *callPythonFunction(std::string varName,
static char *pyObjectToString(PyObject *inputObject)
{
+ PyGILState_STATE gilstate = PyGILState_Ensure();
+
PyObject *encoded = PyUnicode_AsUTF8String(inputObject);
char *result = PyBytes_AsString(encoded);
Py_DECREF(encoded);
Py_DECREF(inputObject);
+
+ PyGILState_Release(gilstate);
return result;
}