Fixed segfault in ci_toggle_animation, fixes issue #173
This commit is contained in:
parent
f478385d59
commit
95a7496edc
2
Makefile
2
Makefile
|
@ -1,4 +1,4 @@
|
||||||
VERSION = git-20140829
|
VERSION = git-20140901
|
||||||
|
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
MANPREFIX = $(PREFIX)/share/man
|
MANPREFIX = $(PREFIX)/share/man
|
||||||
|
|
15
commands.c
15
commands.c
|
@ -290,13 +290,14 @@ bool ci_toggle_animation(arg_t a)
|
||||||
{
|
{
|
||||||
bool dirty = false;
|
bool dirty = false;
|
||||||
|
|
||||||
img.multi.animate = !img.multi.animate;
|
if (img.multi.cnt > 0) {
|
||||||
|
img.multi.animate = !img.multi.animate;
|
||||||
if (img.multi.animate) {
|
if (img.multi.animate) {
|
||||||
dirty = img_frame_animate(&img, true);
|
dirty = img_frame_animate(&img, true);
|
||||||
set_timeout(animate, img.multi.frames[img.multi.sel].delay, true);
|
set_timeout(animate, img.multi.frames[img.multi.sel].delay, true);
|
||||||
} else {
|
} else {
|
||||||
reset_timeout(animate);
|
reset_timeout(animate);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return dirty;
|
return dirty;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue