]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix crash in CL_ModelIndexList_f
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 4 Nov 2011 21:47:09 +0000 (21:47 +0000)
committerRudolf Polzer <divverent@xonotic.org>
Sat, 5 Nov 2011 14:10:39 +0000 (15:10 +0100)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11522 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=4142ab8395d1e37793124e2745d485b9b592202a

cl_main.c

index d0d9fa90cbad026fb2f0c5fdf83ca6b903667c24..96cca42147aa91a1e7b734c2b2cca9d355566c91 100644 (file)
--- 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