]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
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 d6057792051f42d35357cdf25591519421e9584e..fa594fdeda3fe6ea44d07d4ec622c88b88778603 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;