mirror of https://github.com/OpenRCT2/OpenRCT2.git
Guard for nullptr
This commit is contained in:
parent
f5f31496db
commit
2d74287b4b
|
@ -497,6 +497,9 @@ std::optional<CoordsXY> Peep::UpdateWalkingAction(const CoordsXY& differenceLoc,
|
|||
void Peep::ThrowUp()
|
||||
{
|
||||
auto* guest = As<Guest>();
|
||||
if (guest == nullptr)
|
||||
return;
|
||||
|
||||
guest->Hunger /= 2;
|
||||
guest->NauseaTarget /= 2;
|
||||
|
||||
|
|
Loading…
Reference in New Issue