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: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@467 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2011-07-05 06:50:23 +00:00
parent b7a03b22f3
commit 6181c3307a
1 changed files with 2 additions and 3 deletions

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));