]> git.rm.cloudns.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)
committerRudolf Polzer <divverent@alientrap.org>
Thu, 12 Aug 2010 04:20:45 +0000 (06:20 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10385 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=60e2412bbf8edeea07d1d5ea3d03e075c7044b48

gl_rmain.c

index c61765ce104cf054b13bb9cfe157e490f98734de..84678fe5433779775aca841a193568b7ec9b4edf 100644 (file)
@@ -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;
                }