seg fault fix when parsing incorrect C++ namespace code

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9653 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2007-03-16 23:39:28 +00:00
commit 337f63fd28
2 changed files with 6 additions and 1 deletions

View file

@ -520,7 +520,9 @@ class TypePass:private Dispatcher {
} else {
if (name) {
Node *nn = Swig_symbol_clookup(name, n);
Hash *ts = Getattr(nn, "typescope");
Hash *ts = 0;
if (nn)
Getattr(nn, "typescope");
if (!ts) {
SwigType_new_scope(name);
SwigType_attach_symtab(Getattr(n, "symtab"));