aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-10-08 19:17:40 +0200
committerGitHub <noreply@github.com>2018-10-08 19:17:40 +0200
commita03955f9368cfa1c190e4194eed8437dce22eb77 (patch)
treedb6a2954091db98c4125ac1c28c2d41460a4458c
parent16e727a6541d3e44c60b116c4278b6bb9f51e3c6 (diff)
parentefb123899fa217ea08cd048b7af2ba7670a273fb (diff)
Merge pull request #2799 from ianyfan/commands
commands: when setting urgency, check container is not null
-rw-r--r--sway/commands/urgent.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/commands/urgent.c b/sway/commands/urgent.c
index 53c37d4d..4f283c55 100644
--- a/sway/commands/urgent.c
+++ b/sway/commands/urgent.c
@@ -12,6 +12,9 @@ struct cmd_results *cmd_urgent(int argc, char **argv) {
return error;
}
struct sway_container *container = config->handler_context.container;
+ if (!container) {
+ return cmd_results_new(CMD_FAILURE, "urgent", "No current container");
+ }
if (!container->view) {
return cmd_results_new(CMD_INVALID, "urgent",
"Only views can be urgent");