--- tr_shader.bak 2005-10-20 15:56:41.000000000 +0200 +++ tr_shader.c 2005-10-20 16:04:58.000000000 +0200 @@ -2566,7 +2566,14 @@ shader_t *sh; hash = generateHashValue(name, FILE_HASH_SIZE); - + + // 20051020 misantropia -- probably not necessary since this function + // only gets called from tr_font.c with lightmapIndex == LIGHTMAP_2D + // but better safe than sorry. + if ( lightmapIndex >= tr.numLightmaps ) { + lightmapIndex = LIGHTMAP_WHITEIMAGE; + } + // // see if the shader is already loaded //