diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 0d17ca147d..d8658879fd 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -4,6 +4,7 @@ - Improved: [#26947] Rain is now drawn next to the bottom info panels (in RCT2 style). - Change: [#27100] Negative G-forces no longer turn red in the stats window and graph when below -2.50. - Fix: [#1514] Wrong capitalisation for strings in the Guest List window. +- Fix: [#15423] Crash when a guest or handyman uses a bin whose path addition object is not loaded. - Fix: [#17409] When reading system settings, non-US dollar currencies are not recognised correctly. - Fix: [#19754, #27109] Some rides in RCT1 saves have a wrong number of cars per train. - Fix: [#20882] When setting rides with preservation status in the Scenario Editor, some rides are not shown. diff --git a/src/openrct2/entity/Guest.cpp b/src/openrct2/entity/Guest.cpp index e6530acc4e..42efecbedd 100644 --- a/src/openrct2/entity/Guest.cpp +++ b/src/openrct2/entity/Guest.cpp @@ -5939,7 +5939,7 @@ namespace OpenRCT2 break; auto* pathAddEntry = pathElement->getAdditionEntry(); - if (!pathAddEntry->flags.has(PathAdditionFlag::isBin)) + if (pathAddEntry == nullptr || !pathAddEntry->flags.has(PathAdditionFlag::isBin)) break; if (pathElement->isBroken()) diff --git a/src/openrct2/entity/Staff.cpp b/src/openrct2/entity/Staff.cpp index 732d73db52..1ada3f9175 100644 --- a/src/openrct2/entity/Staff.cpp +++ b/src/openrct2/entity/Staff.cpp @@ -1204,8 +1204,8 @@ namespace OpenRCT2 } auto* pathAddEntry = tile_element->asPath()->getAdditionEntry(); - if (!pathAddEntry->flags.has(PathAdditionFlag::isBin) || tile_element->asPath()->isBroken() - || tile_element->asPath()->additionIsGhost()) + if (pathAddEntry == nullptr || !pathAddEntry->flags.has(PathAdditionFlag::isBin) + || tile_element->asPath()->isBroken() || tile_element->asPath()->additionIsGhost()) { stateReset(); return;