Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed a small mod by zero error

  • Loading branch information...
commit 0e5f4a14ae0ef287319553a04b542a243bd02019 1 parent 241ea5f
@narlynephi authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 narly_sprite.py
View
4 narly_sprite.py
@@ -116,6 +116,10 @@ def goto_frame(img, frame_num, layer_pos=0, set_active=True):
"""
last_frame = get_last_frame_num(img)
+ # means there's no frames left in the img
+ if last_frame == -1:
+ return
+
frame_num = frame_num % (last_frame+1)
found_frame = False
Please sign in to comment.
Something went wrong with that request. Please try again.