diff options
-rw-r--r-- | Modules/_bsddb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c index ba6af27..b9259d6 100644 --- a/Modules/_bsddb.c +++ b/Modules/_bsddb.c @@ -350,6 +350,8 @@ make_key_dbt(DBObject* self, PyObject* keyobj, DBT* key, int* pflags) CLEAR_DBT(*key); if (keyobj == Py_None) { /* TODO: is None really okay for keys? */ type = _DB_get_type(self); + if (type == -1) + return 0; if (type == DB_RECNO || type == DB_QUEUE) { PyErr_SetString( PyExc_TypeError, |