Browse Source

Fixed segfault in ci_toggle_animation, fixes issue #173

master
Bert Münnich 10 years ago
parent
commit
95a7496edc
2 changed files with 9 additions and 8 deletions
  1. +1
    -1
      Makefile
  2. +8
    -7
      commands.c

+ 1
- 1
Makefile View File

@@ -1,4 +1,4 @@
VERSION = git-20140829
VERSION = git-20140901

PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man


+ 8
- 7
commands.c View File

@@ -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;
}


Loading…
Cancel
Save