W_LoadWadFile: free wad_base only if it isn't NULL.

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@358 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2010-12-30 23:30:42 +00:00
parent 666482998d
commit 82dde7c347

View file

@ -76,7 +76,8 @@ void W_LoadWadFile (void) //johnfitz -- filename is now hard-coded for honesty
//TODO: use cache_alloc
int h, len;
free (wad_base);
if (wad_base)
free (wad_base);
len = COM_OpenFile (filename, &h);
if (h == -1)
Sys_Error ("W_LoadWadFile: couldn't load %s", filename);