mirror of https://github.com/OpenTTD/OpenTTD
Fix #7733: Crash when removing a dock next to an industry without a station
parent
880680304d
commit
2f4de0a0fe
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue