diff options
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r-- | Python/pylifecycle.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index d00bf82..bc32eff 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -551,7 +551,10 @@ pycore_create_interpreter(_PyRuntimeState *runtime, _PyEval_FiniThreads(&runtime->ceval); /* Auto-thread-state API */ - _PyGILState_Init(tstate); + status = _PyGILState_Init(tstate); + if (_PyStatus_EXCEPTION(status)) { + return status; + } /* Create the GIL */ status = _PyEval_InitThreads(tstate); |