mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 19:13:07 +01:00
Fix #18802: Game can crash on mechanic path finding
This commit is contained in:
@@ -59,6 +59,7 @@
|
||||
- Fix: [#18696] Construction rights cannot be viewed after all are purchased.
|
||||
- Fix: [#18720] Upwards helix is enabled for the Alpine Coaster, even when cheats are off.
|
||||
- Fix: [#18755] Ferris Wheel and Circus ghosts not coloured correctly.
|
||||
- Fix: [#18802] Game could crash when determining if a mechanic is heading to fix the ride blocking the path.
|
||||
|
||||
0.4.2 (2022-10-05)
|
||||
------------------------------------------------------------------------
|
||||
|
||||
@@ -874,6 +874,9 @@ bool Staff::IsMechanicHeadingToFixRideBlockingPath()
|
||||
return false;
|
||||
|
||||
auto ride = get_ride(trackElement->GetRideIndex());
|
||||
if (ride == nullptr)
|
||||
return false;
|
||||
|
||||
return ride->id == CurrentRide && ride->breakdown_reason == BREAKDOWN_SAFETY_CUT_OUT;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user