Browse Source

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

pull/2/head
Alibek Omarov 4 years ago
parent
commit
8966172ce0
  1. 3
      engine/server/sv_game.c

3
engine/server/sv_game.c

@ -4786,6 +4786,9 @@ qboolean SV_ParseEdict( char **pfile, edict_t *ent ) @@ -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 ))

Loading…
Cancel
Save