mirror of https://github.com/OpenRCT2/OpenRCT2.git
Add assert to test if the ride slot is actually free
This commit is contained in:
parent
6a5bfa5cad
commit
ef8d08c5e5
|
@ -174,6 +174,8 @@ Ride* RideAllocateAtIndex(RideId index)
|
|||
_maxRideSize = std::max<size_t>(idx + 1, _maxRideSize);
|
||||
|
||||
auto result = &_rides[idx];
|
||||
assert(result->id == RideId::GetNull());
|
||||
|
||||
result->id = index;
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue