mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-08 21:31:46 +08:00
engine: client: another possible null pointer dereference
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user