Skip to content

Commit 52b1e1c

Browse files
authored
Merge pull request #18 from boriel-basic/features/zxgraphics
Bug loading sprites
2 parents 3b6a2ec + 16710de commit 52b1e1c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

ZXBStudio/DocumentEditors/ZXGraphics/SpriteEditor.axaml.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,10 @@ private void _Initialize(string fileName)
299299
var al = (sprite.Width / 8) * (sprite.Height / 8);
300300
foreach (var pattern in sprite.Patterns)
301301
{
302-
pattern.Attributes = pattern.Attributes.Take(al).ToArray();
302+
if (pattern.Attributes != null)
303+
{
304+
pattern.Attributes = pattern.Attributes.Take(al).ToArray();
305+
}
303306
}
304307
}
305308

0 commit comments

Comments
 (0)