mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #8672 from Xkeeper0/i/8662
Fix for #8662 paint_haunted_house_structure crash
This commit is contained in:
commit
57471edc47
|
@ -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;
|
||||
|
|
|
@ -41,6 +41,11 @@ static void paint_haunted_house_structure(
|
|||
Ride* ride = get_ride(rideIndex);
|
||||
rct_ride_entry* rideEntry = get_ride_entry(ride->subtype);
|
||||
|
||||
if (rideEntry == nullptr)
|
||||
{
|
||||
log_error("Error drawing haunted house, rideEntry is NULL.");
|
||||
return;
|
||||
}
|
||||
uint32_t baseImageId = rideEntry->vehicles[0].base_image_id;
|
||||
|
||||
if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && ride->vehicles[0] != SPRITE_INDEX_NULL)
|
||||
|
|
|
@ -185,6 +185,9 @@ static bool map_animation_invalidate_small_scenery(int32_t x, int32_t y, int32_t
|
|||
continue;
|
||||
|
||||
sceneryEntry = tileElement->AsSmallScenery()->GetEntry();
|
||||
if (sceneryEntry == nullptr)
|
||||
continue;
|
||||
|
||||
if (scenery_small_entry_has_flag(
|
||||
sceneryEntry,
|
||||
SMALL_SCENERY_FLAG_FOUNTAIN_SPRAY_1 | SMALL_SCENERY_FLAG_FOUNTAIN_SPRAY_4 | SMALL_SCENERY_FLAG_SWAMP_GOO
|
||||
|
|
Loading…
Reference in New Issue