From: havoc Date: Fri, 22 Oct 2004 10:56:42 +0000 (+0000) Subject: don't crash on dlights trying to cast shadows from world surfaces when there is no... X-Git-Tag: xonotic-v0.1.0preview~5435 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=84dbfea667d2b87a899546044e559dd7dca4cf47;p=xonotic%2Fdarkplaces.git don't crash on dlights trying to cast shadows from world surfaces when there is no world model git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4693 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/r_shadow.c b/r_shadow.c index 9402a204..c95d7d46 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -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);