From 3340045d67bef85032eb927fab35da3ebfd21ccf Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 13 Mar 2012 07:07:01 +0000 Subject: [PATCH] Show as 'unknown type' instead of seg faulting in the unusual event that type information is not set. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12915 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 1716aa56a..e1924a1a4 100644 --- a/Lib/python/pyrun.swg +++ b/Lib/python/pyrun.swg @@ -429,7 +429,7 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args) #endif { const char *name = SWIG_TypePrettyName(v->ty); - PyObject *repr = SWIG_Python_str_FromFormat("", name, (void *)v); + PyObject *repr = SWIG_Python_str_FromFormat("", (name ? name : "unknown"), (void *)v); if (v->next) { # ifdef METH_NOARGS PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);