Fix possible null dereference

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13918 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2012-11-19 19:52:44 +00:00
commit 4a25c4695d

View file

@ -421,7 +421,8 @@ void add_defined_foreign_type(Node *n, int overwrite = 0, String *k = 0,
#endif
if (is_fwd_ref) {
// Printf(stderr,"*** 1\n");
add_linked_type(n);
if (n)
add_linked_type(n);
} else {
// Printf(stderr,"*** 1-a\n");
if (SwigType_istemplate(k)) {