diff --git a/PCK-Studio/Forms/Editor/TextureAtlasEditor.cs b/PCK-Studio/Forms/Editor/TextureAtlasEditor.cs index 19e503b5..53cf5389 100644 --- a/PCK-Studio/Forms/Editor/TextureAtlasEditor.cs +++ b/PCK-Studio/Forms/Editor/TextureAtlasEditor.cs @@ -96,7 +96,9 @@ namespace PckStudio originalPictureBox.Image = atlas; var images = atlas.CreateImageList(_areaSize, _imageLayout); - var tiles = images.enumerate().Select(v => new AtlasTile(v.index, GetAtlasArea(v.index, _rowCount, _columnCount, _areaSize, _imageLayout), tileInfos[v.index], v.type)); + var tiles = images.enumerate().Select( + v => new AtlasTile(v.index, GetAtlasArea(v.index, _rowCount, _columnCount, _areaSize, _imageLayout), tileInfos.IndexInRange(v.index) ? tileInfos[v.index] : null, v.type) + ); _tiles = new List(tiles); SelectedIndex = 0;