summaryrefslogtreecommitdiffstats
path: root/pyuno/source/loader/pyuno_loader.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'pyuno/source/loader/pyuno_loader.cxx')
-rw-r--r--pyuno/source/loader/pyuno_loader.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx
index 938d53814545..477c8a3a318a 100644
--- a/pyuno/source/loader/pyuno_loader.cxx
+++ b/pyuno/source/loader/pyuno_loader.cxx
@@ -230,10 +230,12 @@ PythonInit() {
PyThreadState *tstate = PyThreadState_Get();
PyEval_ReleaseThread( tstate );
+#if PY_VERSION_HEX < 0x030B0000
// This tstate is never used again, so delete it here.
// This prevents an assertion in PyThreadState_Swap on the
// PyThreadAttach below.
PyThreadState_Delete(tstate);
+#endif
}
}
};