Changeset - r25370:6e985cc7dbb1
[Not reviewed]
master
0 1 0
Jonathan G Rennison - 4 years ago 2021-05-03 14:03:25
j.g.rennison@gmail.com
Fix #9113: Assertion failure when removing airport with order backup (#9182)
1 file changed with 3 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/station_cmd.cpp
Show inline comments
 
@@ -2394,9 +2394,9 @@ static CommandCost RemoveAirport(TileInd
 

	
 
	if (flags & DC_EXEC) {
 
		for (uint i = 0; i < st->airport.GetNumHangars(); ++i) {
 
			DeleteWindowById(
 
				WC_VEHICLE_DEPOT, st->airport.GetHangarTile(i)
 
			);
 
			TileIndex tile_cur = st->airport.GetHangarTile(i);
 
			OrderBackup::Reset(tile_cur, false);
 
			DeleteWindowById(WC_VEHICLE_DEPOT, tile_cur);
 
		}
 

	
 
		const AirportSpec *as = st->airport.GetSpec();
 
@@ -2418,7 +2418,6 @@ static CommandCost RemoveAirport(TileInd
 
		cost.AddCost(_price[PR_CLEAR_STATION_AIRPORT]);
 

	
 
		if (flags & DC_EXEC) {
 
			if (IsHangarTile(tile_cur)) OrderBackup::Reset(tile_cur, false);
 
			DeleteAnimatedTile(tile_cur);
 
			DoClearSquare(tile_cur);
 
			DeleteNewGRFInspectWindow(GSF_AIRPORTTILES, tile_cur);
0 comments (0 inline, 0 general)