From 4b17b2ea76d39faa9e4679e9074953cf64b2e115 Mon Sep 17 00:00:00 2001 From: Matt Date: Fri, 24 Jul 2020 15:58:17 +0200 Subject: [PATCH] Fix GetAdditionEntry trying obtain the object when no additions exist --- src/openrct2/world/Footpath.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/openrct2/world/Footpath.cpp b/src/openrct2/world/Footpath.cpp index dc461afe14..d330cb43d9 100644 --- a/src/openrct2/world/Footpath.cpp +++ b/src/openrct2/world/Footpath.cpp @@ -1529,6 +1529,8 @@ ObjectEntryIndex PathElement::GetAdditionEntryIndex() const rct_scenery_entry* PathElement::GetAdditionEntry() const { + if (!HasAddition()) + return nullptr; return get_footpath_item_entry(GetAdditionEntryIndex()); }