mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-21 11:21:11 +00:00
Only I_Error in HWR_GetTexture with PARANOIA
This commit is contained in:
parent
fe2daf907b
commit
467cc59c64
1 changed files with 7 additions and 2 deletions
|
@ -758,10 +758,15 @@ static void GetMapTexture(INT32 tex, GLMapTexture_t *grtex, GLMipmap_t *mipmap)
|
||||||
|
|
||||||
GLMapTexture_t *HWR_GetTexture(INT32 tex)
|
GLMapTexture_t *HWR_GetTexture(INT32 tex)
|
||||||
{
|
{
|
||||||
|
if (tex < 0 || tex >= (signed)gl_numtextures)
|
||||||
|
{
|
||||||
#ifdef PARANOIA
|
#ifdef PARANOIA
|
||||||
if ((unsigned)tex >= gl_numtextures)
|
I_Error("HWR_GetTexture: Invalid texture ID %d", tex);
|
||||||
I_Error("HWR_GetTexture: tex >= numtextures\n");
|
#else
|
||||||
|
HWR_SetCurrentTexture(NULL);
|
||||||
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
GLMapTexture_t *grtex = &gl_textures[tex];
|
GLMapTexture_t *grtex = &gl_textures[tex];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue