summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/pystate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index 8faf6a0..b083f8c 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -264,7 +264,7 @@ PyThreadState_Swap(PyThreadState *new)
to be used for a thread. Check this the best we can in debug
builds.
*/
-#if defined(Py_DEBUG)
+#if defined(Py_DEBUG) && defined(WITH_THREAD)
if (new) {
PyThreadState *check = PyGILState_GetThisThreadState();
if (check && check != new)