diff options
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r-- | Objects/dictobject.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c index b496350d47..64876e0519 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -4227,6 +4227,10 @@ _PyDictView_Intersect(PyObject* self, PyObject *other) return NULL; it = PyObject_GetIter(other); + if (it == NULL) { + Py_DECREF(result); + return NULL; + } if (PyDictKeys_Check(self)) { dict_contains = dictkeys_contains; |