diff options
author | Ryan Dwyer <[email protected]> | 2018-10-17 19:55:00 +1000 |
---|---|---|
committer | Ryan Dwyer <[email protected]> | 2018-10-17 19:55:00 +1000 |
commit | 17014c34e2f3568af06b4fc9323256d2b7aa8947 (patch) | |
tree | 7f10ebd976c5f1eff4d33bd7d1b5530490d54317 /sway/commands/border.c | |
parent | 434cbaabf092ec1688b4dfd2d93f38e849531d96 (diff) |
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.
Diffstat (limited to 'sway/commands/border.c')
-rw-r--r-- | sway/commands/border.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/commands/border.c b/sway/commands/border.c index cc0d635a..2eed27bd 100644 --- a/sway/commands/border.c +++ b/sway/commands/border.c @@ -59,7 +59,7 @@ struct cmd_results *cmd_border(int argc, char **argv) { } struct sway_container *container = config->handler_context.container; - if (!container->view) { + if (!container || !container->view) { return cmd_results_new(CMD_INVALID, "border", "Only views can have borders"); } |