Fixed NULL-deref in entity handling code.

This commit is contained in:
Fyren 2010-02-08 19:55:14 -08:00
parent 09668c972e
commit d7b64c18c2

View File

@ -119,7 +119,7 @@ bool IndexToAThings(cell_t num, CBaseEntity **pEntData, edict_t **pEdictData)
if (pEdictData)
{
edict_t *pEdict = ::BaseEntityToEdict(pEntity);
if (pEdict->IsFree())
if (!pEdict || pEdict->IsFree())
{
pEdict = NULL;
}