Fix #15423: Crash when a peep uses an invalid bin (#27158)

This commit is contained in:
Sjoerd de Bruin authored and GitHub committed 2026-09-19 17:25:55 +02:00
1 parent bb3ae63847
commit 9620d2edc4
3 files changed
+4 -3

No files matched your search

+1
View File
@@ -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.
+1 -1
View File
@@ -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())
+2 -2
View File
@@ -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;