mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-28 17:09:10 +00:00
Fix #7733: Crash when removing a dock next to an industry without a station
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user