aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--commands.c15
2 files changed, 9 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index e144a7d..4924b83 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-VERSION = git-20140829
+VERSION = git-20140901
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man
diff --git a/commands.c b/commands.c
index 8fb3296..75cb101 100644
--- a/commands.c
+++ b/commands.c
@@ -290,13 +290,14 @@ bool ci_toggle_animation(arg_t a)
{
bool dirty = false;
- img.multi.animate = !img.multi.animate;
-
- if (img.multi.animate) {
- dirty = img_frame_animate(&img, true);
- set_timeout(animate, img.multi.frames[img.multi.sel].delay, true);
- } else {
- reset_timeout(animate);
+ if (img.multi.cnt > 0) {
+ img.multi.animate = !img.multi.animate;
+ if (img.multi.animate) {
+ dirty = img_frame_animate(&img, true);
+ set_timeout(animate, img.multi.frames[img.multi.sel].delay, true);
+ } else {
+ reset_timeout(animate);
+ }
}
return dirty;
}