aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--swaybar/tray/icon.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/swaybar/tray/icon.c b/swaybar/tray/icon.c
index 2276e36d..8587f3f7 100644
--- a/swaybar/tray/icon.c
+++ b/swaybar/tray/icon.c
@@ -243,6 +243,10 @@ static struct icon_theme *read_theme_file(char *basedir, char *theme_name) {
free(group);
group = strdup(&line[1]);
} else { // key-value pair
+ if (!group) {
+ error = true;
+ break;
+ }
// check well-formed
int eok = 0;
for (; isalnum(line[eok]) || line[eok] == '-'; ++eok) {} // TODO locale?