engine: server: avoid crash if map entity doesn't have classname (tfc map flagwar for example)

This commit is contained in:
Alibek Omarov 2021-06-01 23:45:55 +03:00
parent ddd48c420b
commit 8966172ce0
1 changed files with 3 additions and 0 deletions

View File

@ -4786,6 +4786,9 @@ qboolean SV_ParseEdict( char **pfile, edict_t *ent )
if( ++numpairs >= 256 ) break;
}
if( classname == NULL )
return false;
ent = SV_AllocPrivateData( ent, ALLOC_STRING( classname ));
if( !SV_IsValidEdict( ent ) || FBitSet( ent->v.flags, FL_KILLME ))