diff options
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/object.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/object.c b/Objects/object.c index c634e70..a1a69fa 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -1849,6 +1849,8 @@ Py_ReprEnter(PyObject *obj) Py_ssize_t i; dict = PyThreadState_GetDict(); + /* Ignore a missing thread-state, so that this function can be called + early on startup. */ if (dict == NULL) return 0; list = _PyDict_GetItemId(dict, &PyId_Py_Repr); |