From e0987665d8e5911cb6bf88403e2cd29d7efd05f7 Mon Sep 17 00:00:00 2001 From: Jeff Teunissen Date: Thu, 10 Feb 2000 09:07:26 +0000 Subject: [PATCH] Possible fix to the recently-uncovered UQuake segfault. --- common/cl_main.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/common/cl_main.c b/common/cl_main.c index ea55b62..90f2eff 100644 --- a/common/cl_main.c +++ b/common/cl_main.c @@ -282,18 +282,13 @@ void CL_ClearState (void) S_StopAllSounds (true); - Con_DPrintf ("Clearing memory\n"); - D_FlushCaches (); - Mod_ClearAll (); - if (host_hunklevel) // FIXME: check this... - Hunk_FreeToLowMark (host_hunklevel); - - CL_ClearTEnts (); - -#ifdef UQUAKE +#ifdef QUAKEWORLD + Host_ClearMemory (); +#elif UQUAKE if (!sv.active) Host_ClearMemory (); #endif + CL_ClearTEnts (); // wipe the entire cl structure memset (&cl, 0, sizeof(cl));