diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 3933c321ed2e3d..516d467141ade7 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -3820,8 +3820,8 @@ handle_thread_shutdown_exception(PyThreadState *tstate) assert(tstate != NULL); assert(_PyErr_Occurred(tstate)); PyInterpreterState *interp = tstate->interp; - assert(interp->threads.head != NULL); _PyEval_StopTheWorld(interp); + assert(interp->threads.head != NULL); // We don't have to worry about locking this because the // world is stopped.