diff --git a/src/openrct2/paint/tile_element/Paint.Surface.cpp b/src/openrct2/paint/tile_element/Paint.Surface.cpp index 27b7cba907..f911f2663c 100644 --- a/src/openrct2/paint/tile_element/Paint.Surface.cpp +++ b/src/openrct2/paint/tile_element/Paint.Surface.cpp @@ -515,7 +515,8 @@ static void viewport_surface_smoothen_edge( static bool tile_is_inside_clip_view(const tile_descriptor& tile) { - Guard::ArgumentNotNull(tile.tile_element); + if (tile.tile_element == nullptr) + return false; if (tile.tile_element->base_height > gClipHeight) return false; @@ -584,7 +585,7 @@ static void viewport_surface_draw_tile_side_bottom( neighbourCornerHeight1 = MINIMUM_LAND_HEIGHT / 2; } - if (isWater) + if (isWater && neighbour.tile_element != nullptr) { uint8_t waterHeight = neighbour.tile_element->AsSurface()->GetWaterHeight(); if (waterHeight == height && !neighbourIsClippedAway)