diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 2c0313821d..2f2d99ddf3 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -805,7 +805,8 @@ public: dst.State = src.state; if (src.proximity_track_type == 0xFF) dst.ProximityTrackType = TrackElemType::None; - else if (src.current_ride < RCT12_MAX_RIDES_IN_PARK) + else if ( + src.current_ride < RCT12_MAX_RIDES_IN_PARK && _s6.rides[src.current_ride].type < std::size(RideTypeDescriptors)) dst.ProximityTrackType = RCT2TrackTypeToOpenRCT2(src.proximity_track_type, _s6.rides[src.current_ride].type); else dst.ProximityTrackType = src.proximity_track_type;