fix a NULL
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 6 Dec 2008 20:54:56 +0000 (20:54 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 6 Dec 2008 20:54:56 +0000 (20:54 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8570 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index be2c8d4..701552e 100644 (file)
@@ -6582,7 +6582,7 @@ static void R_ProcessTextureSurfaceList(int texturenumsurfaces, msurface_t **tex
                        RSurf_DrawBatch_GL11_ApplyAmbient(texturenumsurfaces, texturesurfacelist);
                        RSurf_DrawBatch_GL11_ApplyColor(texturenumsurfaces, texturesurfacelist, c[0], c[1], c[2], c[3]);
 
-                       if (rsurface.texture->currentmaterialflags & MATERIALFLAG_MODELLIGHT)
+                       if ((rsurface.texture->currentmaterialflags & MATERIALFLAG_MODELLIGHT) && rsurface.texture->normal3f)
                        {
                                r_refdef.lightmapintensity = 1;
                                RSurf_DrawBatch_GL11_VertexShade(texturenumsurfaces, texturesurfacelist, c[0], c[1], c[2], c[3], false, false);