OpenGL2: Don't segfault if r_ext_multitexture is disabled

This commit is contained in:
Zack Middleton 2014-09-29 00:35:03 -05:00
parent 0e5835a86e
commit 918eed9295
2 changed files with 8 additions and 3 deletions

View file

@ -2370,7 +2370,7 @@ static void CollapseStagesToLightall(shaderStage_t *diffuse,
}
static qboolean CollapseStagesToGLSL(void)
static int CollapseStagesToGLSL(void)
{
int i, j, numStages;
qboolean skip = qfalse;
@ -3107,7 +3107,9 @@ static shader_t *FinishShader( void ) {
//
// look for multitexture potential
//
stage = CollapseStagesToGLSL();
if ( qglActiveTextureARB ) {
stage = CollapseStagesToGLSL();
}
if ( shader.lightmapIndex >= 0 && !hasLightmapStage ) {
if (vertexLightmap) {