Fix calling glEnable() without checking for the rendering mode in the tile

selector. This could lead to a crash when OpenGL wasn't initialized before.

git-svn-id: https://svn.eduke32.com/eduke32@2117 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2011-11-25 09:49:22 +00:00
parent 5efac3a09a
commit ac12a06de4

View file

@ -4202,12 +4202,16 @@ static int32_t DrawTiles(int32_t iTopLeft, int32_t iSelected, int32_t nXTiles, i
int32_t runi=0, usehitile;
static uint8_t loadedhitile[(MAXTILES+7)>>3];
setpolymost2dview();
#ifdef USE_OPENGL
bglEnable(GL_TEXTURE_2D);
setpolymost2dview();
if (rendmode >= 3 && g_lazy_tileselector)
bglDrawBuffer(GL_FRONT_AND_BACK);
if (rendmode >= 3)
{
bglEnable(GL_TEXTURE_2D);
if (g_lazy_tileselector)
bglDrawBuffer(GL_FRONT_AND_BACK);
}
#endif
clearview(0);