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

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@358 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2010-12-30 23:30:42 +00:00
parent 27aebd0608
commit 1729f9ec3c

View file

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