Fix a segfault from a null pointer dereference in netplay.c upnp_init(). (Fixes bug #1099)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8497 4a71c877-e1ca-e34f-864e-861f7616d084
master
Guangcong Luo 2009-11-23 03:06:53 +00:00 committed by Git SVN Gateway
parent b142336188
commit 193c8d142b
1 changed files with 1 additions and 1 deletions

View File

@ -1847,7 +1847,7 @@ static int upnp_init(void *asdf)
}
freeUPNPDevlist(devlist);
if (urls.controlURL[0] == '\0')
if (!urls.controlURL || urls.controlURL[0] == '\0')
{
return false;
}