Fix #3503: Crash when placing docks/airports with no track objects loaded#3511
Merged
duncanspumpkin merged 5 commits intoOpenLoco:masterfrom Dec 9, 2025
Merged
Fix #3503: Crash when placing docks/airports with no track objects loaded#3511duncanspumpkin merged 5 commits intoOpenLoco:masterfrom
duncanspumpkin merged 5 commits intoOpenLoco:masterfrom
Conversation
AaronVanGeffen
approved these changes
Dec 5, 2025
Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
Contributor
Author
|
I've been testing this now that I have the missing object and it turned out there were further issues with the scenario. I've addressed them as well. @AaronVanGeffen suggest you look again. |
duncanspumpkin
commented
Dec 8, 2025
| setTrainModFlags(train, *roadObj); | ||
| } | ||
| else | ||
| else if (mode == TransportMode::rail) |
Contributor
Author
There was a problem hiding this comment.
This was showing up as a crash on the title screen after the span changes. Turned out airplanes can reach this bit of code
duncanspumpkin
commented
Dec 8, 2025
| Widget::drawTab(self, drawingCtx, imageId, widx::tab_station); | ||
| } | ||
| else | ||
| else if (cState.byte_1136063 & (1 << 6)) |
Contributor
Author
There was a problem hiding this comment.
most of the following changes are adjusting indentation. Suggest turning off whitespace chagnes.
AaronVanGeffen
approved these changes
Dec 9, 2025
Member
AaronVanGeffen
left a comment
There was a problem hiding this comment.
Looks like a nice little cleanup!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The game currently assumes that track object slot zero is always valid.
Fix #3503