- fixed missing null check in SetOwner and SetHitOwner.

This commit is contained in:
Christoph Oelckers 2020-11-06 20:13:06 +01:00
parent 2d903ed918
commit 94341e8582

View file

@ -60,7 +60,7 @@ struct weaponhit
inline void SetOwner(weaponhit* a)
{
s.owner = a->GetIndex();
s.owner = a? a->GetIndex() : -1;
}
// same for the 'hittype' owner - which is normally the shooter in an attack.
@ -71,7 +71,7 @@ struct weaponhit
inline void SetHitOwner(weaponhit* a)
{
owner = a->GetIndex();
owner = a ? a->GetIndex() : -1;
}
// This used the Owner field - better move this to something more safe.