diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2014-07-04 20:26:22 -0400 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2014-07-04 20:26:22 -0400 |
commit | ffd45d2437523cd86350351153bec09ed21355c4 (patch) | |
tree | e5aaaeddff6c0dcef419164f9a403c759ddf0a0e /Objects | |
parent | 266bdac56ac50b4c45d54dec1abc454de9ea74bd (diff) | |
parent | 331b006c6a35e7030d49ff31648c734a75109fa0 (diff) | |
download | cpython-ffd45d2437523cd86350351153bec09ed21355c4.tar.gz |
Issue #21897: Fix a crash with the f_locals attribute with closure variables when frame.clear() has been called.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/frameobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c index 0d6229360e..55ee5630f6 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -786,7 +786,7 @@ map_to_dict(PyObject *map, Py_ssize_t nmap, PyObject *dict, PyObject **values, PyObject *key = PyTuple_GET_ITEM(map, j); PyObject *value = values[j]; assert(PyUnicode_Check(key)); - if (deref) { + if (deref && value != NULL) { assert(PyCell_Check(value)); value = PyCell_GET(value); } |