mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-28 09:14:58 +01:00
Fix #22920: Crash when sacking a staff member
This commit is contained in:
committed by
GitHub
parent
75d06c8b89
commit
4b0b32b2b7
@@ -78,6 +78,11 @@ namespace OpenRCT2::Ui::Windows
|
||||
DrawWidgets(dpi);
|
||||
|
||||
Peep* peep = GetEntity<Staff>(EntityId::FromUnderlying(number));
|
||||
// The staff member may have been fired in the meantime.
|
||||
if (peep == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
auto ft = Formatter();
|
||||
peep->FormatNameTo(ft);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user