list2set(): PyList_GetItem could fail.

This commit is contained in:
Barry Warsaw 1996-12-13 23:22:42 +00:00
parent 094579e677
commit 24c4b3d4e8
1 changed files with 3 additions and 1 deletions

View File

@ -100,7 +100,9 @@ list2set(list, set, fd2obj)
SOCKET v;
/* any intervening fileno() calls could decr this refcnt */
o = PyList_GetItem(list, i);
if (!(o = PyList_GetItem(list, i)))
return NULL;
Py_INCREF(o);
if (PyInt_Check(o)) {