fix seg fault with undefined templatee

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8662 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-01-31 17:18:31 +00:00
commit 3c65c5cee3

View file

@ -625,9 +625,9 @@ template_locate(String *name, Parm *tparms, Symtab *tscope) {
Node *
Swig_cparse_template_locate(String *name, Parm *tparms, Symtab *tscope) {
Node *n = template_locate(name, tparms, tscope); /* this function does what we want for templated classes */
String *nodeType = Getattr(n,k_nodetype);
if (n) {
String *nodeType = Getattr(n,k_nodetype);
int isclass = 0;
assert(StringEqual(nodeType,k_template));
isclass = (StringEqual(Getattr(n,k_templatetype),k_class));