diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-01-21 14:15:10 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-01-21 14:15:10 -0500 |
commit | c3fc0d446f64ef7f46bc2a152cd68331de4410d0 (patch) | |
tree | 94c5ffe0dd5e809f012c2579818f3eaa51d1e836 | |
parent | criteria cleanup (diff) | |
download | sway-c3fc0d446f64ef7f46bc2a152cd68331de4410d0.tar.gz sway-c3fc0d446f64ef7f46bc2a152cd68331de4410d0.tar.zst sway-c3fc0d446f64ef7f46bc2a152cd68331de4410d0.zip |
cmd-kill: use sway_assert when no container
-rw-r--r-- | sway/commands/kill.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sway/commands/kill.c b/sway/commands/kill.c index 62a3a514..8208bc14 100644 --- a/sway/commands/kill.c +++ b/sway/commands/kill.c | |||
@@ -1,12 +1,13 @@ | |||
1 | #include <wlr/util/log.h> | 1 | #include <wlr/util/log.h> |
2 | #include "log.h" | ||
2 | #include "sway/input/input-manager.h" | 3 | #include "sway/input/input-manager.h" |
3 | #include "sway/input/seat.h" | 4 | #include "sway/input/seat.h" |
4 | #include "sway/view.h" | 5 | #include "sway/view.h" |
5 | #include "sway/commands.h" | 6 | #include "sway/commands.h" |
6 | 7 | ||
7 | struct cmd_results *cmd_kill(int argc, char **argv) { | 8 | struct cmd_results *cmd_kill(int argc, char **argv) { |
8 | if (!config->handler_context.current_container) { | 9 | if (!sway_assert(config->handler_context.current_container, |
9 | wlr_log(L_ERROR, "cmd_kill called without container context"); | 10 | "cmd_kill called without container context")) { |
10 | return cmd_results_new(CMD_INVALID, NULL, | 11 | return cmd_results_new(CMD_INVALID, NULL, |
11 | "cmd_kill called without container context " | 12 | "cmd_kill called without container context " |
12 | "(this is a bug in sway)"); | 13 | "(this is a bug in sway)"); |