Fix #18413: Trying to set tooltip using null vehicle (#21662)

This commit is contained in:
Michał Janiszewski 2024-03-24 21:21:18 +01:00 committed by GitHub
parent 249c8259c1
commit 0581b1edd3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View File

@ -6,6 +6,7 @@
- Improved: [#21599] Currency signs now use non-breaking spaces.
- Change: [#21529] Classify “Southern Sands”, “Tiny Towers”, “Nevermore Park”, “Pacifica” as expert scenarios.
- Fix: [#910] Extra viewport does not preserve the location when rotating.
- Fix: [#18413] Crash when mouse over a hacked train.
- Fix: [#20338] Cannot select Scenery Picker or Scatter Tool when the scenery recolouring tool is active.
- Fix: [#21419] Cannot place walls underground beneath sloped tiles with clearance checks disabled.
- Fix: [#21434] Number of guests overflows in objective text.

View File

@ -5055,6 +5055,8 @@ void Vehicle::SetMapToolbar() const
if (curRide != nullptr && curRide->type < RIDE_TYPE_COUNT)
{
const Vehicle* vehicle = GetHead();
if (vehicle == nullptr)
return;
size_t vehicleIndex;
for (vehicleIndex = 0; vehicleIndex < std::size(curRide->vehicles); vehicleIndex++)