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 <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-11-10 21:55:38 +00:00
parent 71ac1bfd30
commit 2651042070
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 1 additions and 1 deletions

View File

@ -1943,7 +1943,7 @@ static session_t *session_init(int argc, char **argv, Display *dpy,
} }
ps->file_watch_handle = file_watch_init(ps->loop); 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); file_watch_add(ps->file_watch_handle, config_file, config_file_change_cb, ps);
} }