mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-30 13:21:04 +00:00
- fixed missing null check in SetOwner and SetHitOwner.
This commit is contained in:
parent
2d903ed918
commit
94341e8582
1 changed files with 2 additions and 2 deletions
|
@ -60,7 +60,7 @@ struct weaponhit
|
||||||
|
|
||||||
inline void SetOwner(weaponhit* a)
|
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.
|
// same for the 'hittype' owner - which is normally the shooter in an attack.
|
||||||
|
@ -71,7 +71,7 @@ struct weaponhit
|
||||||
|
|
||||||
inline void SetHitOwner(weaponhit* a)
|
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.
|
// This used the Owner field - better move this to something more safe.
|
||||||
|
|
Loading…
Reference in a new issue