mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-20 19:02:34 +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)
|
||||
{
|
||||
if (tex < 0 || tex >= (signed)gl_numtextures)
|
||||
{
|
||||
#ifdef PARANOIA
|
||||
if ((unsigned)tex >= gl_numtextures)
|
||||
I_Error("HWR_GetTexture: tex >= numtextures\n");
|
||||
I_Error("HWR_GetTexture: Invalid texture ID %d", tex);
|
||||
#else
|
||||
HWR_SetCurrentTexture(NULL);
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
GLMapTexture_t *grtex = &gl_textures[tex];
|
||||
|
||||
|
|
Loading…
Reference in a new issue