diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 5e951de85ef..42a0a58b761 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -3693,7 +3693,7 @@ _PyObject_GetItemsIter(PyObject *obj, PyObject **listitems, } else { *listitems = PyObject_GetIter(obj); - if (listitems == NULL) + if (*listitems == NULL) return -1; }