client: fix weird crash in spectator code during engine initialize

This commit is contained in:
Alibek Omarov 2023-09-09 04:08:09 +03:00
parent 7c08f36bcf
commit 524f4874a8
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ void CHudSpectator::SetSpectatorStartPosition()
cl_entity_t * pEnt = gEngfuncs.GetEntityByIndex( 0 ); // get world model
if ( pEnt )
if ( pEnt && pEnt->model && pEnt->model->entities )
{
char *data;
char keyname[256];