diff options
author | S. Christoffer Eliesen <christoffer@eliesen.no> | 2015-12-20 10:11:11 +0100 |
---|---|---|
committer | S. Christoffer Eliesen <christoffer@eliesen.no> | 2015-12-20 10:14:36 +0100 |
commit | 2779559b153696daab8ce0d4c0ad9066d2353f8a (patch) | |
tree | 6cb66f9aa1349e193bb290864ac37a38d28124ea | |
parent | Merge pull request #366 from mikkeloscar/fix-swaybar-high-cpu (diff) | |
download | sway-2779559b153696daab8ce0d4c0ad9066d2353f8a.tar.gz sway-2779559b153696daab8ce0d4c0ad9066d2353f8a.tar.zst sway-2779559b153696daab8ce0d4c0ad9066d2353f8a.zip |
config: free_bar: Check if outputs is NULL.
bar_config.outputs is NULL if no output is explicitly defined in config
(ie. use for for all outputs).
-rw-r--r-- | sway/config.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/config.c b/sway/config.c index faa3e387..42605f49 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -53,7 +53,9 @@ static void free_bar(struct bar_config *bar) { | |||
53 | } | 53 | } |
54 | list_free(bar->bindings); | 54 | list_free(bar->bindings); |
55 | 55 | ||
56 | free_flat_list(bar->outputs); | 56 | if (bar->outputs) { |
57 | free_flat_list(bar->outputs); | ||
58 | } | ||
57 | free(bar); | 59 | free(bar); |
58 | } | 60 | } |
59 | 61 | ||