Merge pull request #19442 from Gymnasiast/fix/launchpad-build-error

Add missing null check
This commit is contained in:
Matthias Moninger 2023-02-20 00:33:27 +02:00 committed by GitHub
commit ef25274560
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

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)