aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/input.c')
-rw-r--r--sway/commands/input.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/commands/input.c b/sway/commands/input.c
index 5de65621..fa9cf05a 100644
--- a/sway/commands/input.c
+++ b/sway/commands/input.c
@@ -28,6 +28,9 @@ struct cmd_results *cmd_input(int argc, char **argv) {
if (!has_context) {
// caller did not give a context so create one just for this command
config->handler_context.input_config = new_input_config(argv[0]);
+ if (!config->handler_context.input_config) {
+ return cmd_results_new(CMD_FAILURE, NULL, "Couldn't allocate config");
+ }
}
int argc_new = argc-2;