From fddbad229041eb1b13defa0324c96b1f0a16929a Mon Sep 17 00:00:00 2001 From: Alex Maese Date: Sat, 30 Mar 2019 13:01:38 -0500 Subject: [PATCH] Fix a crash in swaybar when an icon dir is not readable --- swaybar/tray/icon.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/swaybar/tray/icon.c b/swaybar/tray/icon.c index 8587f3f7b..56f230e14 100644 --- a/swaybar/tray/icon.c +++ b/swaybar/tray/icon.c @@ -348,6 +348,9 @@ void init_themes(list_t **themes, list_t **basedirs) { *themes = create_list(); for (int i = 0; i < (*basedirs)->length; ++i) { list_t *dir_themes = load_themes_in_dir((*basedirs)->items[i]); + if (dir_themes == NULL) { + continue; + } list_cat(*themes, dir_themes); list_free(dir_themes); }