]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix crash in steelstorm on a ent with no model
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 12 Aug 2010 03:45:36 +0000 (03:45 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 12 Aug 2010 03:45:36 +0000 (03:45 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10385 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index 032ff51a58c641c0d1811597dd47b4e5321608ca..9abaabf6f6c3427c9c7ae2c2407588c2ffdc0bdd 100644 (file)
@@ -7997,7 +7997,7 @@ static void R_View_UpdateEntityVisible (void)
                {
                        ent = r_refdef.scene.entities[i];
                        if (!(ent->flags & renderimask))
-                       if (!R_CullBox(ent->mins, ent->maxs) || (ent->model->type == mod_sprite && (ent->model->sprite.sprnum_type == SPR_LABEL || ent->model->sprite.sprnum_type == SPR_LABEL_SCALE)))
+                       if (!R_CullBox(ent->mins, ent->maxs) || (ent->model && ent->model->type == mod_sprite && (ent->model->sprite.sprnum_type == SPR_LABEL || ent->model->sprite.sprnum_type == SPR_LABEL_SCALE)))
                        if ((ent->flags & (RENDER_NODEPTHTEST | RENDER_VIEWMODEL)) || r_refdef.scene.worldmodel->brush.BoxTouchingVisibleLeafs(r_refdef.scene.worldmodel, r_refdef.viewcache.world_leafvisible, ent->mins, ent->maxs))
                                r_refdef.viewcache.entityvisible[i] = true;
                }