ref: gl: fix harmless NULL pointer dereference in alias model loading code

This commit is contained in:
Alibek Omarov
2026-04-05 05:23:46 +05:00
parent bd3f865cf7
commit 3ace4a61d2

View File

@@ -337,7 +337,6 @@ Mod_CreateSkinData
static rgbdata_t *Mod_CreateSkinData( model_t *mod, const byte *data, int width, int height )
{
static rgbdata_t skin;
char name[MAX_QPATH];
int i;
skin.width = width;
@@ -363,10 +362,8 @@ static rgbdata_t *Mod_CreateSkinData( model_t *mod, const byte *data, int width,
}
}
COM_FileBase( mod->name, name, sizeof( name ));
// for alias models only player can have remap textures
if( mod != NULL && !Q_stricmp( name, "player" ))
if( mod != NULL && !Q_stricmp( mod->name, "player" ))
{
texture_t *tx = NULL;
int i, size;