New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Null pointer dereference in ScriptOrder::GetOrderDistance in VT_AIR mode on waypoint tiles #7593
Comments
Please open a PR with your fix. |
Wouldn't it make more sense for |
|
JGRennison
added a commit
to JGRennison/Upstream-OpenTTD
that referenced
this issue
May 23, 2019
Null pointer dereference occurred when either origin_tile or dest_tile were waypoint tiles.
LordAro
pushed a commit
to JGRennison/Upstream-OpenTTD
that referenced
this issue
Jul 7, 2019
Null pointer dereference occurred when either origin_tile or dest_tile were waypoint tiles.
LordAro
pushed a commit
to JGRennison/Upstream-OpenTTD
that referenced
this issue
Jul 7, 2019
Null pointer dereference occurred when either origin_tile or dest_tile were waypoint tiles.
Closed
douiwby
pushed a commit
to douiwby/OpenTTD
that referenced
this issue
Apr 16, 2020
Null pointer dereference occurred when either origin_tile or dest_tile were waypoint tiles.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version of OpenTTD
Current master
Expected result
No null pointer dereference occurs when calling ScriptOrder::GetOrderDistance in VT_AIR mode with either origin_tile or dest_tile as a waypoint tile.
Actual result
Null pointer dereference occurs when calling ScriptOrder::GetOrderDistance in VT_AIR mode with either origin_tile or dest_tile as a waypoint tile.
ScriptTile::IsStationTile() (i.e. IsTileType(tile, MP_STATION)) returns true for waypoint tiles, however Station::GetByTile() returns nullptr.
Steps to reproduce
Load and unpause the attached savegame.
AIAI v97 calls ScriptOrder::GetOrderDistance in VT_AIR on the west and north corners at initialisation.
GetOrderDistance bug.sav.zip
See also:
JGRennison/OpenTTD-patches@bdcafb3
Thread starting from: https://www.tt-forums.net/viewtopic.php?p=1221446#p1221446
The text was updated successfully, but these errors were encountered: