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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user