Skip to content

Commit 16710de

Browse files
author
Juan Segura
committed
Bug loading sprites
1 parent d2c461f commit 16710de

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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)