host.c (Host_ClearMemory): Do not check if host_hunklevel is

set before freeing the hunk allocations.  The order in Host_Init()
is clear and Host_ClearMemory must not be hit before host_hunklevel
is set. (otherwise, there _will_ be much trouble...)

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@467 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2011-07-05 06:50:23 +00:00
parent 840d7376d5
commit 729621c589

View file

@ -541,9 +541,8 @@ void Host_ClearMemory (void)
Con_DPrintf ("Clearing memory\n");
D_FlushCaches ();
Mod_ClearAll ();
if (host_hunklevel)
Hunk_FreeToLowMark (host_hunklevel);
/* host_hunklevel MUST be set at this point */
Hunk_FreeToLowMark (host_hunklevel);
cls.signon = 0;
memset (&sv, 0, sizeof(sv));
memset (&cl, 0, sizeof(cl));