Obscure seg fault bug fix

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11733 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2009-11-11 00:22:38 +00:00
commit a0ff0a86d0

View file

@ -1120,11 +1120,13 @@ int SwigType_typedef_using(const_String_or_char_ptr name) {
/* Figure out the scope the using directive refers to */
{
prefix = Swig_scopename_prefix(name);
s = SwigType_find_scope(current_scope, prefix);
if (s) {
Hash *ttab = Getattr(s, "typetab");
if (!Getattr(ttab, base) && defined_name) {
Setattr(ttab, base, defined_name);
if (prefix) {
s = SwigType_find_scope(current_scope, prefix);
if (s) {
Hash *ttab = Getattr(s, "typetab");
if (!Getattr(ttab, base) && defined_name) {
Setattr(ttab, base, defined_name);
}
}
}
}