]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Fix a NULL with missing worldmodel.
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 5 Mar 2015 09:28:00 +0000 (09:28 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 5 Mar 2015 09:28:00 +0000 (09:28 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12190 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index daaeb8131a90babd3dd493a8ab9f06ef0ee6b5f0..ec7917bfe9722d176698e2f8a69bd2a3afa0775a 100644 (file)
@@ -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++)