ref: gl: show more detailed Host_Error instead of ASSERT in R_GetTexture

This commit is contained in:
Alibek Omarov
2026-04-04 17:36:05 +05:00
parent 5606346cc1
commit 5f765a35b9
+6 -1
View File
@@ -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];
}