summaryrefslogtreecommitdiff
path: root/psycopg/microprotocols.c
diff options
context:
space:
mode:
Diffstat (limited to 'psycopg/microprotocols.c')
-rw-r--r--psycopg/microprotocols.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/psycopg/microprotocols.c b/psycopg/microprotocols.c
index a4f3517..12ec7fb 100644
--- a/psycopg/microprotocols.c
+++ b/psycopg/microprotocols.c
@@ -88,7 +88,7 @@ _get_superclass_adapter(PyObject *obj, PyObject *proto)
Py_ssize_t i, ii;
type = (PyTypeObject *)Py_TYPE(obj);
- if (!(Py_TPFLAGS_HAVE_CLASS & type->tp_flags)) {
+ if (!((Py_TPFLAGS_HAVE_CLASS & type->tp_flags) && type->tp_mro)) {
/* has no mro */
return NULL;
}