mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-03-13 14:28:01 +00:00
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:
parent
27aebd0608
commit
1729f9ec3c
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue