aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/kill.c
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2018-01-21 14:15:10 -0500
committerLibravatar Tony Crisci <tony@dubstepdish.com>2018-01-21 14:15:10 -0500
commitc3fc0d446f64ef7f46bc2a152cd68331de4410d0 (patch)
tree94c5ffe0dd5e809f012c2579818f3eaa51d1e836 /sway/commands/kill.c
parentcriteria cleanup (diff)
downloadsway-c3fc0d446f64ef7f46bc2a152cd68331de4410d0.tar.gz
sway-c3fc0d446f64ef7f46bc2a152cd68331de4410d0.tar.zst
sway-c3fc0d446f64ef7f46bc2a152cd68331de4410d0.zip
cmd-kill: use sway_assert when no container
Diffstat (limited to 'sway/commands/kill.c')
-rw-r--r--sway/commands/kill.c5
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
7struct cmd_results *cmd_kill(int argc, char **argv) { 8struct 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)");