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
+9 -7
View File
@@ -279,12 +279,14 @@ static void CheckPalettedTextures()
goto fail; goto fail;
} }
GLint size = 0; { // in brackets to hush VC6 error
glGetTexLevelParameteriv(GL_PROXY_TEXTURE_2D, 0, GLenum(GL_TEXTURE_INDEX_SIZE_EXT), &size); GLint size = 0;
if(size != 8) glGetTexLevelParameteriv(GL_PROXY_TEXTURE_2D, 0, GLenum(GL_TEXTURE_INDEX_SIZE_EXT), &size);
{ if(size != 8)
error = ssprintf("Expected an 8-bit palette, got a %i-bit one instead", size); {
goto fail; error = ssprintf("Expected an 8-bit palette, got a %i-bit one instead", size);
goto fail;
}
} }
return; return;
@@ -292,7 +294,7 @@ static void CheckPalettedTextures()
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()