diff options
Diffstat (limited to 'sway/commands')
-rw-r--r-- | sway/commands/border.c | 2 | ||||
-rw-r--r-- | sway/commands/mark.c | 2 | ||||
-rw-r--r-- | sway/commands/title_format.c | 2 | ||||
-rw-r--r-- | sway/commands/unmark.c | 2 |
4 files changed, 4 insertions, 4 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) { | |||
59 | } | 59 | } |
60 | 60 | ||
61 | struct sway_container *container = config->handler_context.container; | 61 | struct sway_container *container = config->handler_context.container; |
62 | if (!container->view) { | 62 | if (!container || !container->view) { |
63 | return cmd_results_new(CMD_INVALID, "border", | 63 | return cmd_results_new(CMD_INVALID, "border", |
64 | "Only views can have borders"); | 64 | "Only views can have borders"); |
65 | } | 65 | } |
diff --git a/sway/commands/mark.c b/sway/commands/mark.c index fb95a7d0..b1f47be1 100644 --- a/sway/commands/mark.c +++ b/sway/commands/mark.c | |||
@@ -19,7 +19,7 @@ struct cmd_results *cmd_mark(int argc, char **argv) { | |||
19 | return error; | 19 | return error; |
20 | } | 20 | } |
21 | struct sway_container *container = config->handler_context.container; | 21 | struct sway_container *container = config->handler_context.container; |
22 | if (!container->view) { | 22 | if (!container || !container->view) { |
23 | return cmd_results_new(CMD_INVALID, "mark", | 23 | return cmd_results_new(CMD_INVALID, "mark", |
24 | "Only views can have marks"); | 24 | "Only views can have marks"); |
25 | } | 25 | } |
diff --git a/sway/commands/title_format.c b/sway/commands/title_format.c index c9ffe8fa..ef1c8935 100644 --- a/sway/commands/title_format.c +++ b/sway/commands/title_format.c | |||
@@ -12,7 +12,7 @@ struct cmd_results *cmd_title_format(int argc, char **argv) { | |||
12 | return error; | 12 | return error; |
13 | } | 13 | } |
14 | struct sway_container *container = config->handler_context.container; | 14 | struct sway_container *container = config->handler_context.container; |
15 | if (!container->view) { | 15 | if (!container || !container->view) { |
16 | return cmd_results_new(CMD_INVALID, "title_format", | 16 | return cmd_results_new(CMD_INVALID, "title_format", |
17 | "Only views can have a title_format"); | 17 | "Only views can have a title_format"); |
18 | } | 18 | } |
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 | } |