engine: client: another possible null pointer dereference
This commit is contained in:
parent
3ef4acecb5
commit
8a8cdd2927
1 changed files with 5 additions and 1 deletions
|
@ -320,11 +320,15 @@ static void CL_CopyEntityToPhysEnt( physent_t *pe, entity_state_t *state, qboole
|
||||||
// client or bot
|
// client or bot
|
||||||
Q_snprintf( pe->name, sizeof( pe->name ), "player %i", pe->player - 1 );
|
Q_snprintf( pe->name, sizeof( pe->name ), "player %i", pe->player - 1 );
|
||||||
}
|
}
|
||||||
else
|
else if( mod != NULL )
|
||||||
{
|
{
|
||||||
// otherwise copy the modelname
|
// otherwise copy the modelname
|
||||||
Q_strncpy( pe->name, mod->name, sizeof( pe->name ));
|
Q_strncpy( pe->name, mod->name, sizeof( pe->name ));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Q_strncpy( pe->name, "entity %i", state->number );
|
||||||
|
}
|
||||||
|
|
||||||
pe->model = pe->studiomodel = NULL;
|
pe->model = pe->studiomodel = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue