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:
parent
3ef4acecb5
commit
8a8cdd2927
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user