Skip to content

Commit

Permalink
Fix crash when generating terrain with a configuration that included …
Browse files Browse the repository at this point in the history
…no LAT ground type
  • Loading branch information
Rampastring committed Sep 5, 2024
1 parent 5bdca9f commit bc0b579
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/TSMapEditor/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace TSMapEditor
{
public static class Constants
{
public const string ReleaseVersion = "1.1.6";
public const string ReleaseVersion = "1.1.7";

public static int CellSizeX = 48;
public static int CellSizeY = 24;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ private void ApplyAutoLATOnArea()
maxX++;

// Did we place a LAT ground?
var latTileSet = terrainGeneratorConfiguration.TileGroups.Select(tg => tg.TileSet).First(ts => Map.TheaterInstance.Theater.LATGrounds.Exists(lg => lg.GroundTileSet == ts));
var latTileSet = terrainGeneratorConfiguration.TileGroups.Select(tg => tg.TileSet).FirstOrDefault(ts => Map.TheaterInstance.Theater.LATGrounds.Exists(lg => lg.GroundTileSet == ts));
if (latTileSet != null)
{
ApplyAutoLATForTileSetPlacement(latTileSet.Index, minX, minY, maxX, maxY);
Expand Down

0 comments on commit bc0b579

Please sign in to comment.