2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 01:45:19 +01:00

engine: client: another possible null pointer dereference

This commit is contained in:
Alibek Omarov 2024-11-06 02:53:26 +03:00
parent 3ef4acecb5
commit 8a8cdd2927

View File

@ -320,11 +320,15 @@ static void CL_CopyEntityToPhysEnt( physent_t *pe, entity_state_t *state, qboole
// client or bot
Q_snprintf( pe->name, sizeof( pe->name ), "player %i", pe->player - 1 );
}
else
else if( mod != NULL )
{
// otherwise copy the modelname
Q_strncpy( pe->name, mod->name, sizeof( pe->name ));
}
else
{
Q_strncpy( pe->name, "entity %i", state->number );
}
pe->model = pe->studiomodel = NULL;