diff options
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/commands.c b/sway/commands.c index c621fa92..381c0133 100644 --- a/sway/commands.c +++ b/sway/commands.c | |||
@@ -2263,14 +2263,14 @@ static struct cmd_results *bar_cmd_font(int argc, char **argv) { | |||
2263 | } | 2263 | } |
2264 | 2264 | ||
2265 | char *font = join_args(argv, argc); | 2265 | char *font = join_args(argv, argc); |
2266 | free(config->current_bar->font); | ||
2266 | if (strlen(font) > 6 && strncmp("pango:", font, 6) == 0) { | 2267 | if (strlen(font) > 6 && strncmp("pango:", font, 6) == 0) { |
2267 | free(config->current_bar->font); | ||
2268 | config->current_bar->font = font; | 2268 | config->current_bar->font = font; |
2269 | sway_log(L_DEBUG, "Settings font '%s' for bar: %s", config->current_bar->font, config->current_bar->id); | ||
2270 | } else { | 2269 | } else { |
2271 | sway_log(L_ERROR, "warning: non-pango font '%s' not supported.", font); | 2270 | config->current_bar->font = font; |
2272 | } | 2271 | } |
2273 | 2272 | ||
2273 | sway_log(L_DEBUG, "Settings font '%s' for bar: %s", config->current_bar->font, config->current_bar->id); | ||
2274 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | 2274 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); |
2275 | } | 2275 | } |
2276 | 2276 | ||