From efb123899fa217ea08cd048b7af2ba7670a273fb Mon Sep 17 00:00:00 2001 From: Ian Fan Date: Mon, 8 Oct 2018 17:35:01 +0100 Subject: commands: when setting urgency, check container is not null --- sway/commands/urgent.c | 3 +++ 1 file changed, 3 insertions(+) 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"); -- cgit v1.2.3