From 1729f9ec3cca259e2159f60748ae3244d761b37b Mon Sep 17 00:00:00 2001 From: sezero Date: Thu, 30 Dec 2010 23:30:42 +0000 Subject: [PATCH] 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 --- Quake/wad.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Quake/wad.c b/Quake/wad.c index c3998031..f90b4200 100644 --- a/Quake/wad.c +++ b/Quake/wad.c @@ -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);