Changeset - r24018:68b9f73f7c73
[Not reviewed]
master
0 1 0
Jonathan G Rennison - 5 years ago 2020-01-05 14:49:11
j.g.rennison@gmail.com
Fix: Assertion failure when post road-works cleanup removes all road pieces
1 file changed with 6 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/road_cmd.cpp
Show inline comments
 
@@ -1955,6 +1955,12 @@ static void TileLoop_Road(TileIndex tile
 

	
 
			if (old_rb != new_rb) {
 
				RemoveRoad(tile, DC_EXEC | DC_AUTO | DC_NO_WATER, (old_rb ^ new_rb), RTT_ROAD, true);
 

	
 
				/* If new_rb is 0, there are now no road pieces left and the tile is no longer a road tile */
 
				if (new_rb == 0) {
 
					MarkTileDirtyByTile(tile);
 
					return;
 
				}
 
			}
 
		}
 

	
0 comments (0 inline, 0 general)