diff options
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/dictobject.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 5433ff7..2eddc86 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -734,7 +734,8 @@ PyDict_GetItem(PyObject *op, PyObject *key) Let's just hope that no exception occurs then... This must be _PyThreadState_Current and not PyThreadState_GET() because in debug mode, the latter complains if tstate is NULL. */ - tstate = _PyThreadState_Current; + tstate = (PyThreadState*)_Py_atomic_load_relaxed( + &_PyThreadState_Current); if (tstate != NULL && tstate->curexc_type != NULL) { /* preserve the existing exception */ PyObject *err_type, *err_value, *err_tb; |