mirror of
https://github.com/swaywm/sway.git
synced 2026-03-13 05:34:04 -04:00
bar_cmd_colors: fix crash on incorrect usage
should display error message instead to be consistent with other subcommands.
This commit is contained in:
parent
e3c2412565
commit
b081eba05d
1 changed files with 4 additions and 0 deletions
|
|
@ -72,6 +72,10 @@ static struct cmd_results *parse_three_colors(char ***colors,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct cmd_results *bar_cmd_colors(int argc, char **argv) {
|
struct cmd_results *bar_cmd_colors(int argc, char **argv) {
|
||||||
|
struct cmd_results *error = NULL;
|
||||||
|
if ((error = checkarg(argc, "colors", EXPECTED_AT_LEAST, 1))) {
|
||||||
|
return error;
|
||||||
|
}
|
||||||
return config_subcommand(argv, argc, bar_colors_handlers,
|
return config_subcommand(argv, argc, bar_colors_handlers,
|
||||||
sizeof(bar_colors_handlers));
|
sizeof(bar_colors_handlers));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue