1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Fix crash in FerrisWheel paint

[OpenRCT2/OpenRCT2#8662]
This commit is contained in:
Xkeeper
2019-02-05 11:14:17 -08:00
parent a22260b56a
commit 2828cbb2fc

View File

@@ -57,6 +57,11 @@ static void paint_ferris_wheel_structure(
Ride* ride = get_ride(rideIndex);
rct_ride_entry* rideEntry = get_ride_entry(ride->subtype);
rct_vehicle* vehicle = nullptr;
if (rideEntry == nullptr)
{
log_error("Error drawing Ferris Wheel, rideEntry is NULL.");
return;
}
int8_t xOffset = !(direction & 1) ? axisOffset : 0;
int8_t yOffset = (direction & 1) ? axisOffset : 0;