PHP: fix for the template_ref_type testcase

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11528 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Miklos Vajna 2009-08-11 10:19:04 +00:00
commit b61f9da6e6

View file

@ -1194,7 +1194,7 @@ public:
const char *pname_cstr = GetChar(p, "name");
// Just get rid of the C++ namespace part for now.
const char *ptr = NULL;
if ((ptr = strrchr(pname_cstr, ':'))) {
if (pname_cstr && (ptr = strrchr(pname_cstr, ':'))) {
pname_cstr = ptr + 1;
}
if (!pname_cstr) {