diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2010-03-24 22:53:22 +0100 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2010-03-24 22:53:22 +0100 |
commit | 3f7ffcb9dc191fe841a4252d6b09e9b495d15f2d (patch) | |
tree | c1596f200758c875fe6ba8e3c23607b7c2564f31 /src/slideshow.c | |
parent | 7c12650b8e451fabaa79ff5c11d58753448fd638 (diff) |
Fix segfault related to the random slideshow jump feature
Diffstat (limited to 'src/slideshow.c')
-rw-r--r-- | src/slideshow.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/slideshow.c b/src/slideshow.c index 4835360..1a3ffe8 100644 --- a/src/slideshow.c +++ b/src/slideshow.c @@ -207,6 +207,7 @@ void slideshow_change_image(winwidget winwid, int change) break; case SLIDE_RAND: current_file = feh_list_jump(filelist, current_file, FORWARD, rand() % filelist_len); + change = SLIDE_NEXT; break; case SLIDE_JUMP_FWD: if (filelist_len < 5) @@ -308,11 +309,12 @@ char *slideshow_create_name(feh_file * file) int len = 0; D_ENTER(4); + if (!opt.title) { len = strlen(PACKAGE " [slideshow mode] - ") + strlen(file->filename) + 1; s = emalloc(len); snprintf(s, len, PACKAGE " [%d of %d] - %s", - gib_list_num(filelist, current_file) + 1, gib_list_length(filelist), file->filename); + gib_list_num(filelist, current_file) + 1, gib_list_length(filelist), file->filename); } else { s = estrdup(feh_printf(opt.title, file)); } |