From: havoc Date: Thu, 12 Aug 2010 03:45:36 +0000 (+0000) Subject: fix crash in steelstorm on a ent with no model X-Git-Tag: xonotic-v0.1.0preview~288 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a51110921a87eaa7e259ef10fb3da016c64698ff;p=xonotic%2Fdarkplaces.git fix crash in steelstorm on a ent with no model git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10385 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=60e2412bbf8edeea07d1d5ea3d03e075c7044b48 --- diff --git a/gl_rmain.c b/gl_rmain.c index c61765ce..84678fe5 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -7141,7 +7141,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; }