From 6bb35657f2fa7539beaf91ca488dbcb6f684501b Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Mon, 14 Mar 2005 21:16:25 +0000 Subject: [PATCH] fix possible seg fault when reporting bad object type git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7061 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/python/pyrun.swg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg index 400417daf..a0753b043 100644 --- a/Lib/python/pyrun.swg +++ b/Lib/python/pyrun.swg @@ -460,7 +460,7 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) { if (type) { #if defined(SWIG_COBJECT_TYPES) - if (PySwigObject_Check(obj)) { + if (obj && PySwigObject_Check(obj)) { const char *otype = (const char *) PySwigObject_GetDesc(obj); if (otype) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received",