OpenGL2: Fix crash when BSP has deluxe maps and vertex lit surfaces

Reported by Mickaël Thomas (mickael9).
This commit is contained in:
Zack Middleton 2018-02-18 13:05:27 -06:00
parent d1f82ed567
commit 00c3480938
1 changed files with 1 additions and 1 deletions

View File

@ -2232,7 +2232,7 @@ static void CollapseStagesToLightall(shaderStage_t *diffuse,
defs |= LIGHTDEF_USE_LIGHT_VERTEX;
}
if (r_deluxeMapping->integer && tr.worldDeluxeMapping && lightmap)
if (r_deluxeMapping->integer && tr.worldDeluxeMapping && lightmap && shader.lightmapIndex >= 0)
{
//ri.Printf(PRINT_ALL, ", deluxemap");
diffuse->bundle[TB_DELUXEMAP] = lightmap->bundle[0];