X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/78b57918f8937a77455beb4ea20a5a50dbd6d629..922ba68045d84789ab1dfceb4d1aa1b6e2c5e810:/wxPython/src/helpers.cpp diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index 483442eb46..8216a27e4e 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -542,6 +542,7 @@ PyObject* PyFindClassWithAttr(PyObject *klass, PyObject *name) if (PyType_Check(klass)) { // new style classes // This code is borrowed/adapted from _PyType_Lookup in typeobject.c + // (TODO: This part is not tested yet, so I'm not sure it is correct...) PyTypeObject* type = (PyTypeObject*)klass; PyObject *mro, *res, *base, *dict; /* Look in tp_dict of types in MRO */ @@ -559,7 +560,7 @@ PyObject* PyFindClassWithAttr(PyObject *klass, PyObject *name) assert(dict && PyDict_Check(dict)); res = PyDict_GetItem(dict, name); if (res != NULL) - return res; + return base; } return NULL; }