summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Objects/typeobject.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 8b51a53..49c7d52 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -2175,8 +2175,10 @@ PyType_Ready(PyTypeObject *type)
PyTypeObject *base;
int i, n;
- if (type->tp_flags & Py_TPFLAGS_READY)
+ if (type->tp_flags & Py_TPFLAGS_READY) {
+ assert(type->tp_dict != NULL);
return 0;
+ }
assert((type->tp_flags & Py_TPFLAGS_READYING) == 0);
type->tp_flags |= Py_TPFLAGS_READYING;