From b264de0a907b22eef7ca6fc5acf76c45ca1a2ad8 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 ::stable-branch::merge=4142ab8395d1e37793124e2745d485b9b592202a --- cl_main.c | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.39.2