mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix #15819: Potential crash placing a maze design
This commit is contained in:
parent
af78bbb448
commit
8158956f18
|
@ -1525,6 +1525,11 @@ void Ride::ValidateStations()
|
|||
continue;
|
||||
|
||||
auto trackType = trackElement->AsTrack()->GetTrackType();
|
||||
|
||||
// get the StationIndex for the station
|
||||
StationIndex stationId = 0;
|
||||
if (trackType != TrackElemType::Maze)
|
||||
{
|
||||
uint8_t trackSequence = trackElement->AsTrack()->GetSequenceIndex();
|
||||
|
||||
// determine where the ride entrance is relative to the station track
|
||||
|
@ -1536,10 +1541,7 @@ void Ride::ValidateStations()
|
|||
{
|
||||
continue;
|
||||
}
|
||||
// get the StationIndex for the station
|
||||
StationIndex stationId = 0;
|
||||
if (trackType != TrackElemType::Maze)
|
||||
{
|
||||
|
||||
stationId = trackElement->AsTrack()->GetStationIndex();
|
||||
}
|
||||
if (tileElement->AsEntrance()->GetEntranceType() == ENTRANCE_TYPE_RIDE_EXIT)
|
||||
|
|
Loading…
Reference in New Issue