fix error reported by William K. Foster about bad strings generating seg faults

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8549 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-01-24 22:32:37 +00:00
commit 740ca6c1da

View file

@ -133,7 +133,7 @@ SWIG_Tcl_ConvertPtrFromString(Tcl_Interp *interp, const char *c, void **ptr, swi
c++;
c = SWIG_UnpackData(c,ptr,sizeof(void *));
if (ty) {
tc = SWIG_TypeCheck(c,ty);
tc = c ? SWIG_TypeCheck(c,ty) : 0;
if (!tc) {
return SWIG_ERROR;
}