Commit bf608750 authored by Martin v. Löwis's avatar Martin v. Löwis

Patch #980082: Missing INCREF in PyType_Ready.

parent deacce2c
......@@ -3143,8 +3143,10 @@ PyType_Ready(PyTypeObject *type)
/* Initialize tp_base (defaults to BaseObject unless that's us) */
base = type->tp_base;
if (base == NULL && type != &PyBaseObject_Type)
if (base == NULL && type != &PyBaseObject_Type) {
base = type->tp_base = &PyBaseObject_Type;
Py_INCREF(base);
}
/* Initialize the base class */
if (base && base->tp_dict == NULL) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment