1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 12:33:17 +01:00

Fix #14582: Vehicle::GetCar function causing server crash (#14583)

Co-authored-by: @RoyGherbel
This commit is contained in:
ZxBiohazardZx
2021-05-07 14:23:37 +02:00
committed by GitHub
parent bbc2f7c4e8
commit ad1bfe0f49

View File

@@ -3664,6 +3664,10 @@ void Guest::UpdateRideAdvanceThroughEntrance()
}
vehicle = vehicle->GetCar(CurrentCar);
if (vehicle == nullptr)
{
return;
}
ride_entry = vehicle->GetRideEntry();
if (ride_entry == nullptr)
@@ -3981,6 +3985,10 @@ void Guest::UpdateRideEnterVehicle()
if (vehicle != nullptr)
{
vehicle = vehicle->GetCar(CurrentCar);
if (vehicle == nullptr)
{
return;
}
if (ride->mode != RideMode::ForwardRotation && ride->mode != RideMode::BackwardRotation)
{