diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg index 5eedca483..d43b75202 100644 --- a/Lib/python/pyrun.swg +++ b/Lib/python/pyrun.swg @@ -569,6 +569,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) next = tmp; #endif if (!SwigPyObject_Check(next)) { + PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject"); return NULL; } sobj->next = next;