forked from rosebudai/OpenRCT2-Web
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:
2 files changed
+4
No files matched your search
@@ -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)
|
||||
------------------------------------------------------------------------
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user