fix a crash in R_CompleteLightPoint during rtworld sampling
authorvortex <vortex@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 18 Oct 2010 01:26:27 +0000 (01:26 +0000)
committervortex <vortex@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 18 Oct 2010 01:26:27 +0000 (01:26 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10548 d7cf8633-e32d-0410-b094-e92efae38249

r_shadow.c

index d605779..fa594fd 100644 (file)
@@ -6029,6 +6029,8 @@ void R_CompleteLightPoint(vec3_t ambientcolor, vec3_t diffusecolor, vec3_t diffu
                        for (i = 0; i < numlights; i++)
                        {
                                dlight = (dlight_t *) Mem_ExpandableArray_RecordAtIndex(&r_shadow_worldlightsarray, i);
+                               if (!dlight)
+                                       continue;
                                light = &dlight->rtlight;
                                if (!(light->flags & flag))
                                        continue;