From 4342eab3c36ed87085fedf87bd0641889051c388 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 2 Oct 2017 18:54:36 +0200 Subject: Fix segfault when running slideshow mode with !opt.display Happens e.g. when using -O without enabling thumbnail/index mode Closes #335 --- src/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)); -- cgit v1.2.3