diff options
Diffstat (limited to 'sources/shiboken6/libshiboken/sbkfeature_base.cpp')
-rw-r--r-- | sources/shiboken6/libshiboken/sbkfeature_base.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sources/shiboken6/libshiboken/sbkfeature_base.cpp b/sources/shiboken6/libshiboken/sbkfeature_base.cpp index 01b2c0657..acf527e49 100644 --- a/sources/shiboken6/libshiboken/sbkfeature_base.cpp +++ b/sources/shiboken6/libshiboken/sbkfeature_base.cpp @@ -207,6 +207,8 @@ static PyObject *lookupUnqualifiedOrOldEnum(PyTypeObject *type, PyObject *name) for (idx = 0; idx < n; ++idx) { auto *base = PyTuple_GET_ITEM(mro, idx); auto *type_base = reinterpret_cast<PyTypeObject *>(base); + if (!SbkObjectType_Check(type_base)) + continue; auto sotp = PepType_SOTP(type_base); // The EnumFlagInfo structure tells us if there are Enums at all. const char **enumFlagInfo = sotp->enumFlagInfo; |