summaryrefslogtreecommitdiffstats
path: root/Python/errors.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/errors.c')
-rw-r--r--Python/errors.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/errors.c b/Python/errors.c
index 70365aa..5d17256 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -1426,7 +1426,7 @@ void
_PyErr_WriteUnraisableMsg(const char *err_msg_str, PyObject *obj)
{
PyThreadState *tstate = _PyThreadState_GET();
- assert(tstate != NULL);
+ _Py_EnsureTstateNotNULL(tstate);
PyObject *err_msg = NULL;
PyObject *exc_type, *exc_value, *exc_tb;