From 6181c3307a2e49a6417e85c13fa2e20d297beb56 Mon Sep 17 00:00:00 2001 From: sezero Date: Tue, 5 Jul 2011 06:50:23 +0000 Subject: [PATCH] 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 --- Quake/host.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Quake/host.c b/Quake/host.c index e930c4b5..9458ea6a 100644 --- a/Quake/host.c +++ b/Quake/host.c @@ -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));