1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 21:13:05 +01:00

Merge pull request #10091 from tupaschoal/nullprt-deref-avoid-get_first_at

Avoid dereferencing invalid map_get_first_element_at return
This commit is contained in:
Duncan
2019-10-19 13:55:54 +02:00
committed by GitHub
10 changed files with 42 additions and 7 deletions

View File

@@ -1094,6 +1094,8 @@ static TileElement* footpath_get_tile_element_to_remove()
tileElement = map_get_first_element_at(x, y);
do
{
if (tileElement == nullptr)
break;
if (tileElement->GetType() == TILE_ELEMENT_TYPE_PATH)
{
if (tileElement->base_height == z)