diff options
author | Charles Pigott <charlespigott@googlemail.com> | 2019-10-25 23:43:09 +0100 |
---|---|---|
committer | Charles Pigott <charlespigott@googlemail.com> | 2019-10-26 00:35:01 +0100 |
commit | 2f4de0a0fe115df05453bd025ea7f5c4928bb67c (patch) | |
tree | bac3c24975bdddb3a49f7488d664a6f0a78a0b3a | |
parent | 880680304dfe8443e1d7d98f1fe46733e88e4301 (diff) | |
download | openttd-2f4de0a0fe115df05453bd025ea7f5c4928bb67c.tar.xz |
Fix #7733: Crash when removing a dock next to an industry without a station
-rw-r--r-- | src/station_cmd.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 4519eba56..636b1c476 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -2607,7 +2607,8 @@ void RemoveDockingTile(TileIndex t) if (IsTileType(tile, MP_STATION)) { UpdateStationDockingTiles(Station::GetByTile(tile)); } else if (IsTileType(tile, MP_INDUSTRY)) { - UpdateStationDockingTiles(Industry::GetByTile(tile)->neutral_station); + Station *neutral = Industry::GetByTile(tile)->neutral_station; + if (neutral != nullptr) UpdateStationDockingTiles(neutral); } } } |