aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/unmark.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-10-17 19:55:00 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-10-17 19:55:00 +1000
commit17014c34e2f3568af06b4fc9323256d2b7aa8947 (patch)
tree7f10ebd976c5f1eff4d33bd7d1b5530490d54317 /sway/commands/unmark.c
parentMerge pull request #2843 from c-edw/feature/2842_TruncateMessage (diff)
downloadsway-17014c34e2f3568af06b4fc9323256d2b7aa8947.tar.gz
sway-17014c34e2f3568af06b4fc9323256d2b7aa8947.tar.zst
sway-17014c34e2f3568af06b4fc9323256d2b7aa8947.zip
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/unmark.c')
-rw-r--r--sway/commands/unmark.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/commands/unmark.c b/sway/commands/unmark.c
index c6251dc8..c671ed4e 100644
--- a/sway/commands/unmark.c
+++ b/sway/commands/unmark.c
@@ -25,7 +25,7 @@ struct cmd_results *cmd_unmark(int argc, char **argv) {
25 struct sway_view *view = NULL; 25 struct sway_view *view = NULL;
26 if (config->handler_context.using_criteria) { 26 if (config->handler_context.using_criteria) {
27 struct sway_container *container = config->handler_context.container; 27 struct sway_container *container = config->handler_context.container;
28 if (!container->view) { 28 if (!container || !container->view) {
29 return cmd_results_new(CMD_INVALID, "unmark", 29 return cmd_results_new(CMD_INVALID, "unmark",
30 "Only views can have marks"); 30 "Only views can have marks");
31 } 31 }