Merge pull request #26872 from Gymnasiast/fix/26811

Fix #26811: Crash when a ride points to a non-existing station object
This commit is contained in:
Michael Steenbeek authored and GitHub committed 2026-08-05 22:58:56 +02:00
commit bcd7708dc1
2 files changed
+4

No files matched your search

+1
View File
@@ -3,6 +3,7 @@
- Improved: [#26099] The ride type selection cheat has been moved into the ride operations tab.
- Improved: [#26099] The ride visiblity cheat has been moved into the ride colour/appearance tab.
- Fix: [#25169] The convert command strips custom objects from the resulting park.
- Fix: [#26811] Crash when a ride points to a non-existing station object.
0.5.4 (2026-08-02)
------------------------------------------------------------------------
+3
View File
@@ -5211,6 +5211,9 @@ namespace OpenRCT2::Ui::Windows
// Draw entrance label
auto* stationObj = ride->getStationObject();
if (stationObj == nullptr)
return;
Formatter ft;
ft.Add<StringId>(stationObj->NameStringId);
drawTextEllipsised(clippedRT, { 19, 1 }, widget.width() - 12 - 19, STR_WINDOW_COLOUR_2_STRINGID, ft);