list2set(): PyList_GetItem could fail.
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index a1e3cf0..dfe95484 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -100,7 +100,9 @@
 		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)) {