From 990fcd92835f7626c1fc3d14c7efb2934a5055d3 Mon Sep 17 00:00:00 2001
From: Daniel Friesel <derf@finalrewind.org>
Date: Mon, 8 Jul 2019 18:58:18 +0200
Subject: Fix lockup when receiving a signal and inotify is enabled

That part slipped through while reviewing the PR...
---
 src/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src')

diff --git a/src/main.c b/src/main.c
index f7ea18b..31ab8f8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -213,7 +213,7 @@ int feh_main_iteration(int block)
 			else if ((count > 0) && (FD_ISSET(0, &fdset)))
 				feh_event_handle_stdin();
 #ifdef HAVE_INOTIFY
-			else if (count && (FD_ISSET(opt.inotify_fd, &fdset)))
+			else if ((count > 0) && (FD_ISSET(opt.inotify_fd, &fdset)))
                 feh_event_handle_inotify();
 #endif
 		}
@@ -230,7 +230,7 @@ int feh_main_iteration(int block)
 			else if ((count > 0) && (FD_ISSET(0, &fdset)))
 				feh_event_handle_stdin();
 #ifdef HAVE_INOTIFY
-			else if (count && (FD_ISSET(opt.inotify_fd, &fdset)))
+			else if ((count > 0) && (FD_ISSET(opt.inotify_fd, &fdset)))
                 feh_event_handle_inotify();
 #endif
 		}
-- 
cgit v1.2.3