aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/libshiboken/signature/signature.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/libshiboken/signature/signature.cpp')
-rw-r--r--sources/shiboken2/libshiboken/signature/signature.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/sources/shiboken2/libshiboken/signature/signature.cpp b/sources/shiboken2/libshiboken/signature/signature.cpp
index 3051c50d5..191af3d9b 100644
--- a/sources/shiboken2/libshiboken/signature/signature.cpp
+++ b/sources/shiboken2/libshiboken/signature/signature.cpp
@@ -471,6 +471,9 @@ static PyObject *adjustFuncName(const char *func_name)
// Run `eval` on the type string to get the object.
AutoDecRef obtype(PyRun_String(_path, Py_eval_input, ns, ns));
+ if (obtype.isNull())
+ return String::fromCString(func_name);
+
if (PyModule_Check(obtype.object())) {
// This is a plain function. Return the unmangled name.
return String::fromCString(func_name);