#5503 - SIGSEGV with r_vertexlight 1 in missionpack (patch by Serge Belyshev).

This commit is contained in:
Zack Middleton 2012-05-07 23:06:00 +00:00
parent 2c5d0c1e3a
commit 5abf7e3d84

View file

@ -627,7 +627,7 @@ static qboolean ParseStage( shaderStage_t *stage, char **text )
else if ( !Q_stricmp( token, "$lightmap" ) ) else if ( !Q_stricmp( token, "$lightmap" ) )
{ {
stage->bundle[0].isLightmap = qtrue; stage->bundle[0].isLightmap = qtrue;
if ( shader.lightmapIndex < 0 ) { if ( shader.lightmapIndex < 0 || !tr.lightmaps ) {
stage->bundle[0].image[0] = tr.whiteImage; stage->bundle[0].image[0] = tr.whiteImage;
} else { } else {
stage->bundle[0].image[0] = tr.lightmaps[shader.lightmapIndex]; stage->bundle[0].image[0] = tr.lightmaps[shader.lightmapIndex];