summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-09-08 09:55:25 +0200
committerDaniel Friesel <derf@finalrewind.org>2018-09-08 09:55:25 +0200
commit9241e8faa78cc02c08537ed0bd7b236d172c3ed7 (patch)
treec9f5fad66d18795fc3da05d4cb198634ca564f20
parent602641c73512874d39011030b05bce03cc55134f (diff)
parent5f46d5a4c29936826e5355e684056b2e8423921f (diff)
Merge branch 'ulteq-no-cycle-fix'
-rw-r--r--src/slideshow.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/slideshow.c b/src/slideshow.c
index 6a4f4d1..3770677 100644
--- a/src/slideshow.c
+++ b/src/slideshow.c
@@ -238,9 +238,11 @@ void slideshow_change_image(winwidget winwid, int change, int render)
if (change == SLIDE_FIRST) {
current_file = gib_list_last(filelist);
change = SLIDE_NEXT;
+ previous_file = NULL;
} else if (change == SLIDE_LAST) {
current_file = filelist;
change = SLIDE_PREV;
+ previous_file = NULL;
}
/* The for loop prevents us looping infinitely */
@@ -336,7 +338,7 @@ void slideshow_change_image(winwidget winwid, int change, int render)
last = NULL;
}
- if (opt.on_last_slide == ON_LAST_SLIDE_HOLD &&
+ if (opt.on_last_slide == ON_LAST_SLIDE_HOLD && previous_file &&
((current_file == filelist && change == SLIDE_NEXT) ||
(previous_file == filelist && change == SLIDE_PREV))) {
current_file = previous_file;