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

Fix NPE due to missing scenery

This commit is contained in:
MaxMallon
2022-01-19 13:20:38 +01:00
committed by GitHub
parent 992ece4a4c
commit 9d29de1444

View File

@@ -460,7 +460,7 @@ static bool map_animation_invalidate_large_scenery(const CoordsXYZ& loc)
continue;
auto* sceneryEntry = tileElement->AsLargeScenery()->GetEntry();
if (sceneryEntry->flags & LARGE_SCENERY_FLAG_ANIMATED)
if (sceneryEntry != nullptr && sceneryEntry->flags & LARGE_SCENERY_FLAG_ANIMATED)
{
map_invalidate_tile_zoom1({ loc, loc.z, loc.z + 16 });
wasInvalidated = true;