mirror of
https://github.com/swaywm/sway.git
synced 2024-11-23 00:11:28 +00:00
bar: free old position when changing
This commit is contained in:
parent
87334dbccb
commit
ba8981e44b
|
@ -17,6 +17,7 @@ struct cmd_results *bar_cmd_position(int argc, char **argv) {
|
|||
if (strcasecmp(valid[i], argv[0]) == 0) {
|
||||
wlr_log(WLR_DEBUG, "Setting bar position '%s' for bar: %s",
|
||||
argv[0], config->current_bar->id);
|
||||
free(config->current_bar->position);
|
||||
config->current_bar->position = strdup(argv[0]);
|
||||
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue