From 45c1c09489bc22a7b9cd6540a2cbc7d7ff459794 Mon Sep 17 00:00:00 2001 From: res Date: Thu, 3 Jan 2008 17:52:28 +0000 Subject: [PATCH] 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 --- model_alias.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.39.2