summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2017-10-02 18:54:36 +0200
committerDaniel Friesel <derf@finalrewind.org>2017-10-02 18:54:36 +0200
commit4342eab3c36ed87085fedf87bd0641889051c388 (patch)
tree474f4a109a8b12deedc81cb653f142bfa04520e2 /src
parentfaf94a3aa5310e7ed461c9fe60f6f3b834c986e5 (diff)
Fix segfault when running slideshow mode with !opt.display
Happens e.g. when using -O without enabling thumbnail/index mode Closes #335
Diffstat (limited to 'src')
-rw-r--r--src/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 605c113..840919f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -73,11 +73,14 @@ int main(int argc, char **argv)
feh_wm_set_bg_filelist(opt.bgmode);
exit(0);
}
- else {
+ else if (opt.display){
/* Slideshow mode is the default. Because it's spiffy */
opt.slideshow = 1;
init_slideshow_mode();
}
+ else {
+ eprintf("Invalid option combination");
+ }
/* main event loop */
while (feh_main_iteration(1));