From: divverent Date: Thu, 5 Mar 2015 09:28:00 +0000 (+0000) Subject: Fix a NULL with missing worldmodel. X-Git-Tag: xonotic-v0.8.1~8^2~13 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=eca1a195eb2ec2a34c3f97d53fbbc8d60b657e53;p=xonotic%2Fdarkplaces.git Fix a NULL with missing worldmodel. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12190 d7cf8633-e32d-0410-b094-e92efae38249 --- 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++)