mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-25 07:44:38 +01:00
Fix #9388: Crash using set grass length cheat
This commit is contained in:
@@ -356,7 +356,11 @@ private:
|
||||
{
|
||||
for (x = 0; x < MAXIMUM_MAP_SIZE_TECHNICAL; x++)
|
||||
{
|
||||
auto surfaceElement = map_get_surface_element_at(x, y)->AsSurface();
|
||||
auto tileElement = map_get_surface_element_at(x, y);
|
||||
if (tileElement == nullptr)
|
||||
continue;
|
||||
|
||||
auto surfaceElement = tileElement->AsSurface();
|
||||
if (surfaceElement != nullptr && (surfaceElement->GetOwnership() & OWNERSHIP_OWNED)
|
||||
&& surfaceElement->GetWaterHeight() == 0 && surfaceElement->CanGrassGrow())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user