Fix potential null pointer dereferences

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13923 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2012-11-20 23:29:07 +00:00
commit f267e08b5b

View file

@ -2375,14 +2375,14 @@ private:
Iterator b = First(baselist);
if (is_base_first) {
if (!b.item) {
return;
}
if (!GetFlag(b.item, "feature:ignore")) {
addParentExtraBaseInterfaces(n, parents, b.item, true, sf);
}
b = Next(b);
if (!b.item) {
return;
}
}
String *go_name = buildGoName(Getattr(n, "sym:name"), false, false);
@ -4384,7 +4384,7 @@ private:
Delete(p);
}
if (Strstr(ret, "$gotypename") != 0) {
if (ret && Strstr(ret, "$gotypename") != 0) {
ret = NULL;
}