aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
Diffstat (limited to 'sway')
-rw-r--r--sway/config.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sway/config.c b/sway/config.c
index faa3e387..4b1bf01a 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -53,7 +53,9 @@ static void free_bar(struct bar_config *bar) {
}
list_free(bar->bindings);
- free_flat_list(bar->outputs);
+ if (bar->outputs) {
+ free_flat_list(bar->outputs);
+ }
free(bar);
}
@@ -450,7 +452,7 @@ void load_swaybars(swayc_t *output, int output_idx) {
int j;
for (j = 0; j < bar->outputs->length; ++j) {
char *o = bar->outputs->items[j];
- if (strcmp(o, "*") || strcasecmp(o, output->name)) {
+ if (!strcmp(o, "*") || !strcasecmp(o, output->name)) {
apply = true;
break;
}