mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +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);
|
const Flicky* x = static_cast<const Flicky*>(mobj);
|
||||||
|
|
||||||
return x->source();
|
return x->valid() ? x->source() : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean Obj_IsSuperFlickyWhippable(const mobj_t* mobj)
|
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);
|
const Flicky* x = static_cast<const Flicky*>(mobj);
|
||||||
|
|
||||||
return player == x->chasing();
|
return player == x->chasing();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue