1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Fix #23985: Crash when opening New Ride menu

This commit is contained in:
Michael Steenbeek
2025-03-13 22:25:24 +01:00
committed by GitHub
parent 0382973afe
commit 113928a251
3 changed files with 6 additions and 6 deletions

View File

@@ -281,9 +281,9 @@ namespace OpenRCT2::Ui::Windows
RideSelection _windowNewRideListItems[RideListItemsMax]{};
struct NewRideVariables
{
RideSelection SelectedRide;
RideSelection HighlightedRide;
uint16_t SelectedRideCountdown;
RideSelection SelectedRide{};
RideSelection HighlightedRide{};
uint16_t SelectedRideCountdown{};
} _newRideVars{};
public:

View File

@@ -20,7 +20,6 @@
// Set to 255 on all tracked ride entries
static uint8_t constexpr kNoFlatRideCars = 0xFF;
static ride_type_t constexpr kRideTypeNull = 0xFF;
struct RideNaming
{

View File

@@ -19,14 +19,15 @@
struct Ride;
using ride_type_t = uint16_t;
static ride_type_t constexpr kRideTypeNull = 0xFF;
/**
* Couples a ride type and subtype together.
*/
struct RideSelection
{
ride_type_t Type;
ObjectEntryIndex EntryIndex;
ride_type_t Type = kRideTypeNull;
ObjectEntryIndex EntryIndex = kObjectEntryIndexNull;
bool operator==(const RideSelection& other) const
{