Add assert checks to road type infra total changes

This commit is contained in:
Jonathan G Rennison
2021-12-07 02:30:08 +00:00
parent 0b45103eed
commit 5349003ec4
2 changed files with 4 additions and 0 deletions

View File

@@ -2915,6 +2915,8 @@ static void ConvertRoadTypeOwner(TileIndex tile, uint num_pieces, Owner owner, R
// We can't get a company from invalid owners but we can get ownership of roads without an owner
if (owner >= MAX_COMPANIES && owner != OWNER_NONE) return;
assert(from_type != INVALID_ROADTYPE && to_type != INVALID_ROADTYPE);
Company *c;
switch (owner) {