]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
don't crash on dlights trying to cast shadows from world surfaces when there is no...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 22 Oct 2004 10:56:42 +0000 (10:56 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 22 Oct 2004 10:56:42 +0000 (10:56 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4693 d7cf8633-e32d-0410-b094-e92efae38249

r_shadow.c

index 9402a204eac8abf99314801a5bbd13399b5c7708..c95d7d464bf8533014ad54d7bc8f2c74ee527048 100644 (file)
@@ -2146,7 +2146,7 @@ void R_DrawRTLight(rtlight_t *rtlight, int visiblevolumes)
                                GL_LockArrays(0, 0);
                        }
                }
-               else
+               else if (numsurfaces)
                {
                        Matrix4x4_Transform(&ent->inversematrix, rtlight->shadoworigin, relativelightorigin);
                        ent->model->DrawShadowVolume(ent, relativelightorigin, rtlight->radius, numsurfaces, surfacelist);