mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-27 18:24:40 +00:00
Obj_SuperFlickyOwner: check valid before returning source
- Flicky::source() dereferences a pointer
This commit is contained in:
parent
469c85377d
commit
cbe42f969b
1 changed files with 2 additions and 2 deletions
|
|
@ -765,7 +765,7 @@ mobj_t *Obj_SuperFlickyOwner(const mobj_t* mobj)
|
|||
{
|
||||
const Flicky* x = static_cast<const Flicky*>(mobj);
|
||||
|
||||
return x->source();
|
||||
return x->valid() ? x->source() : nullptr;
|
||||
}
|
||||
|
||||
boolean Obj_IsSuperFlickyWhippable(const mobj_t* mobj)
|
||||
|
|
@ -780,4 +780,4 @@ boolean Obj_IsSuperFlickyTargettingYou(const mobj_t* mobj, mobj_t *player)
|
|||
const Flicky* x = static_cast<const Flicky*>(mobj);
|
||||
|
||||
return player == x->chasing();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue