From 90f04cf4781035f77c9ad43f50da2eeda2f95a11 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Tue, 9 Oct 2018 22:12:29 +0200 Subject: [PATCH] Fix #8057: Game crashes when placing an entrance --- src/openrct2/world/Footpath.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2/world/Footpath.cpp b/src/openrct2/world/Footpath.cpp index f7f6fab3eb..ed47ac4563 100644 --- a/src/openrct2/world/Footpath.cpp +++ b/src/openrct2/world/Footpath.cpp @@ -2530,7 +2530,7 @@ static void footpath_fix_corners_around(int32_t x, int32_t y, rct_tile_element* }; // Sloped paths don't create filled corners, so no need to remove any - if (pathElement->AsPath()->IsSloped()) + if (pathElement->GetType() == TILE_ELEMENT_TYPE_PATH && pathElement->AsPath()->IsSloped()) return; for (int32_t xOffset = -1; xOffset <= 1; xOffset++)