From 3c65c5cee3c6879b41c5b3e9b3b6fe6e6b021640 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Tue, 31 Jan 2006 17:18:31 +0000 Subject: [PATCH] fix seg fault with undefined templatee git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8662 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/CParse/templ.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/CParse/templ.c b/Source/CParse/templ.c index fa41362e7..36f9c4ef5 100644 --- a/Source/CParse/templ.c +++ b/Source/CParse/templ.c @@ -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));