From: divverent Date: Sun, 21 Jun 2009 20:14:31 +0000 (+0000) Subject: fix a crash in dpm + framegroups X-Git-Tag: xonotic-v0.1.0preview~1595 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=eda642cb1b998e3243414501ae3b2d74a719b660;p=xonotic%2Fdarkplaces.git fix a crash in dpm + framegroups git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9030 d7cf8633-e32d-0410-b094-e92efae38249 --- 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);