From 2f4de0a0fe115df05453bd025ea7f5c4928bb67c Mon Sep 17 00:00:00 2001 From: Charles Pigott Date: Fri, 25 Oct 2019 23:43:09 +0100 Subject: Fix #7733: Crash when removing a dock next to an industry without a station --- src/station_cmd.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } } } -- cgit v1.2.3-70-g09d2