Mercurial > cpython-lru_cache-weakref
diff Objects/unicodeobject.c @ 81279:3cee61137598 3.3
Issue #16856: Fix a segmentation fault from calling repr() on a dict with
a key whose repr raise an exception.
| author | Serhiy Storchaka <storchaka@gmail.com> |
|---|---|
| date | Fri, 04 Jan 2013 12:39:34 +0200 |
| parents | 5bb289e4fb35 |
| children | cd36e961e42c fee4bc043d73 |
line wrap: on
line diff
--- a/Objects/unicodeobject.c Thu Jan 03 20:34:49 2013 -0800 +++ b/Objects/unicodeobject.c Fri Jan 04 12:39:34 2013 +0200 @@ -10672,7 +10672,7 @@ return; } left = *p_left; - if (right == NULL || !PyUnicode_Check(left)) { + if (right == NULL || left == NULL || !PyUnicode_Check(left)) { if (!PyErr_Occurred()) PyErr_BadInternalCall(); goto error;
