1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-04 13:42:55 +01:00

Add missing null check

This commit is contained in:
Gymnasiast
2023-02-19 22:20:38 +01:00
parent f893a60ec5
commit ee7b9ae6b0

View File

@@ -528,6 +528,8 @@ private:
auto actionResult = res->GetData<StaffHireNewActionResult>();
auto* staff = GetEntity<Staff>(actionResult.StaffEntityId);
if (staff == nullptr)
return;
// If autoposition of staff is disabled, pickup peep and then open the staff window
if (staff->State == PeepState::Picked)