1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 17:42:29 +01:00

Fix #18204: Crash opening New Ride window with invalid highlight

This commit is contained in:
Gymnasiast
2022-10-05 20:13:11 +02:00
parent 4aabc00335
commit 79f3e28b07

View File

@@ -989,7 +989,9 @@ void WindowNewRideFocus(RideSelection rideItem)
}
rct_ride_entry* rideEntry = get_ride_entry(rideItem.EntryIndex);
auto rideTypeIndex = ride_entry_get_first_non_null_ride_type(rideEntry);
if (rideEntry == nullptr)
return;
auto rideTypeIndex = ride_entry_get_first_non_null_ride_type(rideEntry);
w->SetPage(GetRideTypeDescriptor(rideTypeIndex).Category);
}