diff -r 32ebd1846d07 Modules/_ctypes/_ctypes.c --- a/Modules/_ctypes/_ctypes.c Fri Jul 26 15:54:07 2013 +0200 +++ b/Modules/_ctypes/_ctypes.c Fri Jul 26 22:57:38 2013 +0200 @@ -3453,7 +3453,7 @@ static PyObject * Py_INCREF(v); return v; } - if (kwds && (v = PyDict_GetItem(kwds, name))) { + if (kwds && name && (v = PyDict_GetItem(kwds, name))) { ++*pindex; Py_INCREF(v); return v;