fix logging crash (only showed up in release builds run under Win98)

This commit is contained in:
Chris Danford
2003-05-30 23:15:53 +00:00
parent a4e563114a
commit d0b9a755cd
+3 -1
View File
@@ -279,6 +279,7 @@ static void CheckPalettedTextures()
goto fail; goto fail;
} }
{ // in brackets to hush VC6 error
GLint size = 0; GLint size = 0;
glGetTexLevelParameteriv(GL_PROXY_TEXTURE_2D, 0, GLenum(GL_TEXTURE_INDEX_SIZE_EXT), &size); glGetTexLevelParameteriv(GL_PROXY_TEXTURE_2D, 0, GLenum(GL_TEXTURE_INDEX_SIZE_EXT), &size);
if(size != 8) if(size != 8)
@@ -286,13 +287,14 @@ static void CheckPalettedTextures()
error = ssprintf("Expected an 8-bit palette, got a %i-bit one instead", size); error = ssprintf("Expected an 8-bit palette, got a %i-bit one instead", size);
goto fail; goto fail;
} }
}
return; return;
fail: fail:
GLExt::glColorTableEXT = NULL; GLExt::glColorTableEXT = NULL;
GLExt::glGetColorTableParameterivEXT = NULL; GLExt::glGetColorTableParameterivEXT = NULL;
LOG->Info("Paletted textures disabled: %s.", error); LOG->Info("Paletted textures disabled: %s.", error.c_str());
} }
void SetupExtensions() void SetupExtensions()