mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-16 09:21:12 +00:00
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:
parent
5efac3a09a
commit
ac12a06de4
1 changed files with 8 additions and 4 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue