From eda642cb1b998e3243414501ae3b2d74a719b660 Mon Sep 17 00:00:00 2001 From: divverent Date: Sun, 21 Jun 2009 20:14:31 +0000 Subject: [PATCH] fix a crash in dpm + framegroups git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9030 d7cf8633-e32d-0410-b094-e92efae38249 --- model_shared.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/model_shared.c b/model_shared.c index 73326a22..60a59cfa 100644 --- a/model_shared.c +++ b/model_shared.c @@ -280,9 +280,8 @@ void Mod_FrameGroupify(dp_model_t *mod, const char *buf) mod->numframes = cnt; // 1. reallocate - if(mod->animscenes) - Mem_Free(mod->animscenes); - mod->animscenes = (animscene_t *) Mem_Alloc(tempmempool, sizeof(animscene_t) * mod->numframes); + // (we do not free the previous animscenes, but model unloading will free the pool owning them, so it's okay) + mod->animscenes = (animscene_t *) Mem_Alloc(mod->mempool, sizeof(animscene_t) * mod->numframes); // 2. parse Mod_FrameGroupify_ParseGroups(buf, Mod_FrameGroupify_ParseGroups_Store, mod); -- 2.39.2