This commit is contained in:
Benjamin Peterson 2015-03-06 09:09:46 -05:00
commit abda8ddd3e
2 changed files with 7 additions and 0 deletions

View file

@ -220,6 +220,7 @@ PyFloat_AsDouble(PyObject *op)
if (fo == NULL)
return -1;
if (!PyFloat_Check(fo)) {
Py_DECREF(fo);
PyErr_SetString(PyExc_TypeError,
"nb_float should return float object");
return -1;