aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/libshiboken/basewrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/libshiboken/basewrapper.cpp')
-rw-r--r--sources/shiboken2/libshiboken/basewrapper.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/sources/shiboken2/libshiboken/basewrapper.cpp b/sources/shiboken2/libshiboken/basewrapper.cpp
index 15993aff0..000035627 100644
--- a/sources/shiboken2/libshiboken/basewrapper.cpp
+++ b/sources/shiboken2/libshiboken/basewrapper.cpp
@@ -164,6 +164,7 @@ patch_tp_new_wrapper(PyTypeObject *type)
auto newMethod = Shiboken::PyMagicName::new_();
if (old_tp_new_wrapper == nullptr) {
PyObject *func = PyDict_GetItem(PyType_Type.tp_dict, newMethod);
+ assert(func);
PyCFunctionObject *pycf_ob = reinterpret_cast<PyCFunctionObject *>(func);
old_tp_new_wrapper = reinterpret_cast<ternaryfunc>(pycf_ob->m_ml->ml_meth);
}