From 88f3e9be75772cc91e60f1f8f0f4a43cc9f7b747 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Wed, 3 Oct 2018 19:38:18 +0200 Subject: [PATCH] Fix crash --- src/openrct2/world/Footpath.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openrct2/world/Footpath.cpp b/src/openrct2/world/Footpath.cpp index 2b33709429..1b6a04eab9 100644 --- a/src/openrct2/world/Footpath.cpp +++ b/src/openrct2/world/Footpath.cpp @@ -2584,10 +2584,10 @@ void footpath_remove_edges_at(int32_t x, int32_t y, rct_tile_element* tileElemen // to. if (!tile_element_wants_path_connection_towards({ x / 32, y / 32, z1, direction }, tileElement)) { + bool isQueue = tileElement->GetType() == TILE_ELEMENT_TYPE_PATH ? tileElement->AsPath()->IsQueue() : false; int32_t z0 = z1 - 2; footpath_remove_edges_towards( - x + CoordsDirectionDelta[direction].x, y + CoordsDirectionDelta[direction].y, z0, z1, direction, - tileElement->AsPath()->IsQueue()); + x + CoordsDirectionDelta[direction].x, y + CoordsDirectionDelta[direction].y, z0, z1, direction, isQueue); } else {