Skip to content

Commit

Permalink
Fix crash on blank poses
Browse files Browse the repository at this point in the history
  • Loading branch information
LavenderSnek committed Mar 9, 2024
1 parent 01ddd78 commit 23ec85f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/group_finity/mascot/animation/Pose.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ public void next(final Mascot mascot) {
mascot.getAnchor().y + dy()
));

MascotImage img = Main.getInstance()
// ignore if key is null (happens when pose has no image)
MascotImage img = imageKey() == null ? null :
Main.getInstance()
.getImageSet(mascot.getImageSet())
.getImagePairs().get(imageKey())
.getImage(mascot.isLookRight());
Expand Down

0 comments on commit 23ec85f

Please sign in to comment.