From ef8d08c5e5a10689cccbc713aa15dbff90448e97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Tue, 21 Feb 2023 23:57:34 +0200 Subject: [PATCH] Add assert to test if the ride slot is actually free --- src/openrct2/ride/Ride.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/openrct2/ride/Ride.cpp b/src/openrct2/ride/Ride.cpp index cc073177cf..dac8513e4f 100644 --- a/src/openrct2/ride/Ride.cpp +++ b/src/openrct2/ride/Ride.cpp @@ -174,6 +174,8 @@ Ride* RideAllocateAtIndex(RideId index) _maxRideSize = std::max(idx + 1, _maxRideSize); auto result = &_rides[idx]; + assert(result->id == RideId::GetNull()); + result->id = index; return result; }