From 2651042070482b782945288076f5c63dd65dc502 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Sun, 10 Nov 2019 21:55:38 +0000 Subject: [PATCH] core: don't watch config file when there is none Stop picom from complaining about "Failed to watch file", when there is no file to watch. Signed-off-by: Yuxuan Shui --- src/picom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/picom.c b/src/picom.c index 6c4c6447..5535562e 100644 --- a/src/picom.c +++ b/src/picom.c @@ -1943,7 +1943,7 @@ static session_t *session_init(int argc, char **argv, Display *dpy, } ps->file_watch_handle = file_watch_init(ps->loop); - if (ps->file_watch_handle) { + if (ps->file_watch_handle && config_file) { file_watch_add(ps->file_watch_handle, config_file, config_file_change_cb, ps); }