diff --git a/lib/script/event.c b/lib/script/event.c index 4c95df9aa..f2873d383 100644 --- a/lib/script/event.c +++ b/lib/script/event.c @@ -673,14 +673,17 @@ void eventRemoveContext(SCRIPT_CONTEXT *psContext) for(psCChunk = psContext->psGlobals; psCChunk; psCChunk = psNChunk) { psNChunk = psCChunk->psNext; - for(i=0;i < CONTEXT_VALS ; i++) + // FIXME FIXME FIXME - this is commented away because it made loading + // different savegames many times crash for inexplicable reasons. It + // will probably leak memory, though! +/* for(i=0;i < CONTEXT_VALS ; i++) { if (psCChunk->asVals[i].type == VAL_STRING && psCChunk->asVals[i].v.sval) { free(psCChunk->asVals[i].v.sval); psCChunk->asVals[i].v.sval = NULL; } - } + }*/ free(psCChunk); } psContext->psGlobals = NULL;