1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-31 10:45:16 +01:00

Fix GetAdditionEntry trying obtain the object when no additions exist

This commit is contained in:
Matt
2020-07-24 15:58:17 +02:00
parent 6b5f51b3c0
commit 4b17b2ea76

View File

@@ -1529,6 +1529,8 @@ ObjectEntryIndex PathElement::GetAdditionEntryIndex() const
rct_scenery_entry* PathElement::GetAdditionEntry() const
{
if (!HasAddition())
return nullptr;
return get_footpath_item_entry(GetAdditionEntryIndex());
}