From 0a326e1bc8e806711051b92963a09f33d2d5b0e4 Mon Sep 17 00:00:00 2001 From: Spoike Date: Wed, 22 Feb 2006 23:46:22 +0000 Subject: [PATCH] Don't Crash!!! (This isn't a real fix) git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2008 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/common/zone.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engine/common/zone.c b/engine/common/zone.c index 94cbdc58b..74dd262f4 100644 --- a/engine/common/zone.c +++ b/engine/common/zone.c @@ -1347,6 +1347,12 @@ cache_system_t *cache_head; void Cache_Free (cache_user_t *c) { cache_system_t *cs; + if (c->data == NULL) + { + cache_head = NULL; //this is evil and should never happen + Host_EndGame("Cache was already free\n"); + return; + } cs = ((cache_system_t *)c->data)-1; cs = (cache_system_t*)((char*)cs - CACHEDEBUG);