diff options
author | Brian Ashworth <RedSoxFan@users.noreply.github.com> | 2018-10-08 15:18:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-08 15:18:49 -0400 |
commit | 3f328b62768d7801f0544b31ab8f9dde3014fd1d (patch) | |
tree | 3572a9e1bff58710c22638d85ce1206af3999d94 /sway/config.c | |
parent | Remove duplicate code (diff) | |
parent | Merge pull request #2799 from ianyfan/commands (diff) | |
download | sway-3f328b62768d7801f0544b31ab8f9dde3014fd1d.tar.gz sway-3f328b62768d7801f0544b31ab8f9dde3014fd1d.tar.zst sway-3f328b62768d7801f0544b31ab8f9dde3014fd1d.zip |
Merge branch 'master' into popup-during-fullscreen
Diffstat (limited to 'sway/config.c')
-rw-r--r-- | sway/config.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sway/config.c b/sway/config.c index 070b15c8..a50e9144 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -136,6 +136,8 @@ void free_config(struct sway_config *config) { | |||
136 | free(config->floating_scroll_left_cmd); | 136 | free(config->floating_scroll_left_cmd); |
137 | free(config->floating_scroll_right_cmd); | 137 | free(config->floating_scroll_right_cmd); |
138 | free(config->font); | 138 | free(config->font); |
139 | free(config->swaybg_command); | ||
140 | free(config->swaynag_command); | ||
139 | free((char *)config->current_config_path); | 141 | free((char *)config->current_config_path); |
140 | free((char *)config->current_config); | 142 | free((char *)config->current_config); |
141 | free(config); | 143 | free(config); |
@@ -166,7 +168,7 @@ static void set_color(float dest[static 4], uint32_t color) { | |||
166 | } | 168 | } |
167 | 169 | ||
168 | static void config_defaults(struct sway_config *config) { | 170 | static void config_defaults(struct sway_config *config) { |
169 | config->swaynag_command = strdup("swaynag"); | 171 | if (!(config->swaynag_command = strdup("swaynag"))) goto cleanup; |
170 | config->swaynag_config_errors = (struct swaynag_instance){ | 172 | config->swaynag_config_errors = (struct swaynag_instance){ |
171 | .args = "--type error " | 173 | .args = "--type error " |
172 | "--message 'There are errors in your config file' " | 174 | "--message 'There are errors in your config file' " |
@@ -241,6 +243,8 @@ static void config_defaults(struct sway_config *config) { | |||
241 | 243 | ||
242 | if (!(config->active_bar_modifiers = create_list())) goto cleanup; | 244 | if (!(config->active_bar_modifiers = create_list())) goto cleanup; |
243 | 245 | ||
246 | if (!(config->swaybg_command = strdup("swaybg"))) goto cleanup; | ||
247 | |||
244 | if (!(config->config_chain = create_list())) goto cleanup; | 248 | if (!(config->config_chain = create_list())) goto cleanup; |
245 | config->current_config_path = NULL; | 249 | config->current_config_path = NULL; |
246 | config->current_config = NULL; | 250 | config->current_config = NULL; |