mirror of
https://github.com/swaywm/sway.git
synced 2025-11-24 06:59:51 -05:00
Fix crashes when running certain commands on an empty workspace
This fixes crashes when running the border, mark, unmark and title_format commands on an empty workspace.
This commit is contained in:
parent
434cbaabf0
commit
17014c34e2
4 changed files with 4 additions and 4 deletions
|
|
@ -19,7 +19,7 @@ struct cmd_results *cmd_mark(int argc, char **argv) {
|
|||
return error;
|
||||
}
|
||||
struct sway_container *container = config->handler_context.container;
|
||||
if (!container->view) {
|
||||
if (!container || !container->view) {
|
||||
return cmd_results_new(CMD_INVALID, "mark",
|
||||
"Only views can have marks");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue