From 4142ab8395d1e37793124e2745d485b9b592202a Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 4 Nov 2011 21:47:09 +0000 Subject: [PATCH] fix crash in CL_ModelIndexList_f git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11522 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cl_main.c b/cl_main.c index 6f8df54f..9566174a 100644 --- a/cl_main.c +++ b/cl_main.c @@ -509,6 +509,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 -- 2.39.2