From eca1a195eb2ec2a34c3f97d53fbbc8d60b657e53 Mon Sep 17 00:00:00 2001 From: divverent Date: Thu, 5 Mar 2015 09:28:00 +0000 Subject: [PATCH] Fix a NULL with missing worldmodel. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12190 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_rmain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gl_rmain.c b/gl_rmain.c index daaeb813..ec7917bf 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -5248,7 +5248,7 @@ static void R_View_UpdateEntityVisible (void) r_refdef.viewcache.entityvisible[i] = true; } } - if(r_cullentities_trace.integer && r_refdef.scene.worldmodel->brush.TraceLineOfSight && !r_refdef.view.useclipplane && !r_trippy.integer) + if(r_cullentities_trace.integer && r_refdef.scene.worldmodel && r_refdef.scene.worldmodel->brush.TraceLineOfSight && !r_refdef.view.useclipplane && !r_trippy.integer) // sorry, this check doesn't work for portal/reflection/refraction renders as the view origin is not useful for culling { for (i = 0;i < r_refdef.scene.numentities;i++) -- 2.39.2