- Added a NULL pointer check to A_Fire() and copied the target to a local

variable inside A_VileAttack() so that if P_DamageMobj() destroys the
  target, the function will still have a valid pointer to it (since reading
  it from the actor's instance data invokes the read barrier, which would
  return NULL).


SVN r1538 (trunk)
This commit is contained in:
Randy Heit 2009-04-10 03:54:28 +00:00
commit bb9b5ebf92
3 changed files with 24 additions and 20 deletions

View file

@ -643,15 +643,12 @@ bool P_CheckSight (const AActor *t1, const AActor *t2, int flags)
bool res;
#ifdef _DEBUG
assert (t1 != NULL);
assert (t2 != NULL);
#else
if (t1 == NULL || t2 == NULL)
{
return false;
}
#endif
const sector_t *s1 = t1->Sector;
const sector_t *s2 = t2->Sector;