summaryrefslogtreecommitdiffstats
path: root/Objects/frameobject.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2014-07-05 00:24:13 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2014-07-05 00:24:13 (GMT)
commitacc8cf2cfa18c445e8c9b324206eb7c5e392bcb7 (patch)
tree0c8300eb1c66c97fcf29404ef008b3d544aeefdb /Objects/frameobject.c
parente865128605faf64c63cd216507a0875e4c5a424b (diff)
downloadcpython-acc8cf2cfa18c445e8c9b324206eb7c5e392bcb7.zip
cpython-acc8cf2cfa18c445e8c9b324206eb7c5e392bcb7.tar.gz
cpython-acc8cf2cfa18c445e8c9b324206eb7c5e392bcb7.tar.bz2
Issue #21897: Fix a crash with the f_locals attribute with closure variables when frame.clear() has been called.
Diffstat (limited to 'Objects/frameobject.c')
-rw-r--r--Objects/frameobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index 0d62293..55ee563 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);
}