Skip to content

Commit

Permalink
Merge pull request #47 from mgrider/0.2.1-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
STREGA authored Aug 5, 2024
2 parents 152e608 + 8615b06 commit a3b520b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public final class SpriteComponent: Component {
internal var moveToNextAnimationIfNeeded: Bool = false
public var activeAnimation: SpriteAnimation? {
get {
if let index = self.activeAnimationIndex {
if let index = self.activeAnimationIndex, self.animations.count > index {
return self.animations[index]
}
return nil
Expand Down

0 comments on commit a3b520b

Please sign in to comment.