mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-10 22:22:10 +08:00
ref: gl: show more detailed Host_Error instead of ASSERT in R_GetTexture
This commit is contained in:
+6
-1
@@ -46,7 +46,12 @@ acess to array elem
|
||||
*/
|
||||
gl_texture_t *R_GetTexture( unsigned int texnum )
|
||||
{
|
||||
Assert( texnum < MAX_TEXTURES );
|
||||
if( texnum >= MAX_TEXTURES )
|
||||
{
|
||||
gEngfuncs.Host_Error( "%s: texnum (%d) >= MAX_TEXTURES (%d)", __func__, texnum, MAX_TEXTURES );
|
||||
texnum = 0;
|
||||
}
|
||||
|
||||
return &gl_textures[texnum];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user