From 31eeda11b0952e7520a5171c5b683ad6fba0f519 Mon Sep 17 00:00:00 2001 From: Alex Maese Date: Sat, 30 Mar 2019 13:01:38 -0500 Subject: Fix a crash in swaybar when an icon dir is not readable --- swaybar/tray/icon.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'swaybar') diff --git a/swaybar/tray/icon.c b/swaybar/tray/icon.c index 8587f3f7..56f230e1 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); } -- cgit v1.2.3-54-g00ecf