Skip to content

Commit

Permalink
Fixed null palette (made optional in 1.3.5)
Browse files Browse the repository at this point in the history
  • Loading branch information
deepnight committed Apr 2, 2024
1 parent 27bb7c0 commit 1b649c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ase/Ase.hx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ using Lambda;
ase.frames.push(frame);
}

final paletteChunk:PaletteChunk = cast ase.firstFrame.chunkTypes[ChunkType.PALETTE][0];
var untypedChunks = ase.frames[0].chunkTypes[ChunkType.PALETTE];
final paletteChunk:PaletteChunk = untypedChunks!=null && untypedChunks.length>0 ? (cast untypedChunks)[0] : null;

ase.palette = new Palette(paletteChunk);

Expand Down

0 comments on commit 1b649c4

Please sign in to comment.