Changeset - r23889:81df97f74fe7
[Not reviewed]
master
0 1 0
Charles Pigott - 5 years ago 2019-10-25 22:43:09
charlespigott@googlemail.com
Fix #7733: Crash when removing a dock next to an industry without a station
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/station_cmd.cpp
Show inline comments
 
@@ -2604,13 +2604,14 @@ void RemoveDockingTile(TileIndex t)
 
		TileIndex tile = t + TileOffsByDiagDir(d);
 
		if (!IsValidTile(tile)) continue;
 

	
 
		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);
 
		}
 
	}
 
}
 

	
 
/**
 
 * Clear docking tile status from tiles around a removed dock, if the tile has
0 comments (0 inline, 0 general)