From: havoc Date: Fri, 4 Nov 2011 21:47:09 +0000 (+0000) Subject: fix crash in CL_ModelIndexList_f X-Git-Tag: xonotic-v0.6.0~184 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b264de0a907b22eef7ca6fc5acf76c45ca1a2ad8;p=xonotic%2Fdarkplaces.git fix crash in CL_ModelIndexList_f git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11522 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=4142ab8395d1e37793124e2745d485b9b592202a --- diff --git a/cl_main.c b/cl_main.c index d0d9fa90..96cca421 100644 --- a/cl_main.c +++ b/cl_main.c @@ -520,6 +520,8 @@ static void CL_ModelIndexList_f(void) for (i = -MAX_MODELS;i < MAX_MODELS;i++) { model = CL_GetModelByIndex(i); + if (!model) + continue; if(model->loaded || i == 1) Con_Printf("%3i: %-30s %-8s %-10i\n", i, model->name, model->modeldatatypestring, model->surfmesh.num_triangles); else