From 51a55b9705dd7b5e959de26e11fe26231b4716c8 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@8662 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Source/CParse/templ.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SWIG/Source/CParse/templ.c b/SWIG/Source/CParse/templ.c index fa41362e7..36f9c4ef5 100644 --- a/SWIG/Source/CParse/templ.c +++ b/SWIG/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));