summaryrefslogtreecommitdiff
path: root/Python/pystate.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pystate.c')
-rw-r--r--Python/pystate.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index eca26c78c8..3fae85be88 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -63,6 +63,10 @@ PyInterpreterState_New(void)
if (interp != NULL) {
HEAD_INIT();
+#ifdef WITH_THREAD
+ if (head_mutex == NULL)
+ Py_FatalError("Can't initialize threads for interpreter");
+#endif
interp->modules = NULL;
interp->sysdict = NULL;
interp->builtins = NULL;