mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Guard for nullptr
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user