1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 19:43:06 +01:00

Fix #16343: Crash in Ride::PopulateVehicleTypeDropdown()

This commit is contained in:
Michael Steenbeek
2022-01-01 15:07:42 +01:00
committed by GitHub
parent c2b33e3541
commit 875115ec33

View File

@@ -2115,7 +2115,9 @@ static void PopulateVehicleTypeDropdown(Ride* ride, bool forceRefresh)
auto& rideEntries = objManager.GetAllRideEntries(rideTypeIterator);
for (auto rideEntryIndex : rideEntries)
{
auto currentRideEntry = get_ride_entry(rideEntryIndex);
const auto* currentRideEntry = get_ride_entry(rideEntryIndex);
if (currentRideEntry == nullptr)
continue;
// Skip if vehicle type has not been invented yet
if (!ride_entry_is_invented(rideEntryIndex) && !gCheatsIgnoreResearchStatus)