- 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:
parent
be9a05e32b
commit
bb9b5ebf92
3 changed files with 24 additions and 20 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue