From: res Date: Thu, 3 Jan 2008 17:52:28 +0000 (+0000) Subject: Fix crash in MD3 loading when no animscenes are loaded X-Git-Tag: xonotic-v0.1.0preview~2600 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=45c1c09489bc22a7b9cd6540a2cbc7d7ff459794;p=xonotic%2Fdarkplaces.git Fix crash in MD3 loading when no animscenes are loaded git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7895 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/model_alias.c b/model_alias.c index 2214583f..7fdf1873 100644 --- a/model_alias.c +++ b/model_alias.c @@ -1531,7 +1531,8 @@ void Mod_IDP3_Load(model_t *mod, void *buffer, void *bufferend) Mod_Alias_CalculateBoundingBox(); Mod_FreeSkinFiles(skinfiles); - loadmodel->surfmesh.isanimated = loadmodel->numframes > 1 || loadmodel->animscenes[0].framecount > 1; + loadmodel->surfmesh.isanimated = loadmodel->numframes > 1 + || (loadmodel->animscenes && loadmodel->animscenes[0].framecount > 1); } void Mod_ZYMOTICMODEL_Load(model_t *mod, void *buffer, void *bufferend)