add IsFree check

This commit is contained in:
yed_ 2015-05-05 01:06:40 +01:00
parent 8b2d7a1e49
commit f504188854

View File

@ -46,7 +46,7 @@ static CBaseEntity *FindEntityByNetClass(int start, const char *classname)
for (int i = start; i < maxEntities; i++)
{
edict_t *current = gamehelpers->EdictOfIndex(i);
if (current == NULL)
if (current == NULL || current->IsFree())
continue;
IServerNetworkable *network = current->GetNetworkable();