(svn r17443) -Fix (r17442): clear the depot tile after removing the depot in all cases instead of only for ships; makes removing road/rail depots not crash :)

This commit is contained in:
rubidium
2009-09-07 08:35:45 +00:00
parent 6bdef071d6
commit 389e1bdfbe
2 changed files with 2 additions and 2 deletions

View File

@@ -1442,8 +1442,8 @@ static CommandCost RemoveTrainDepot(TileIndex tile, DoCommandFlag flags)
if (v != NULL) FreeTrainTrackReservation(v);
}
DoClearSquare(tile);
delete Depot::GetByTile(tile);
DoClearSquare(tile);
AddSideToSignalBuffer(tile, dir, owner);
YapfNotifyTrackLayoutChange(tile, DiagDirToDiagTrack(dir));
if (v != NULL) TryPathReserve(v, true);