commit 31eeda11b0952e7520a5171c5b683ad6fba0f519
parent 2cae0d5e3a9c5abc7c2aa2aad4021c86730b2ec9
Author: Alex Maese <memaese@hotmail.com>
Date: Sat, 30 Mar 2019 13:01:38 -0500
Fix a crash in swaybar when an icon dir is not readable
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git 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);
}