diff options
Diffstat (limited to 'sway/commands/output.c')
-rw-r--r-- | sway/commands/output.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/commands/output.c b/sway/commands/output.c index e150aed2..01ac9f4e 100644 --- a/sway/commands/output.c +++ b/sway/commands/output.c | |||
@@ -26,6 +26,9 @@ struct cmd_results *cmd_output(int argc, char **argv) { | |||
26 | const char *name = argv[0]; | 26 | const char *name = argv[0]; |
27 | 27 | ||
28 | struct output_config *output = calloc(1, sizeof(struct output_config)); | 28 | struct output_config *output = calloc(1, sizeof(struct output_config)); |
29 | if (!output) { | ||
30 | return cmd_results_new(CMD_FAILURE, "output", "Unable to allocate output config"); | ||
31 | } | ||
29 | output->x = output->y = output->width = output->height = -1; | 32 | output->x = output->y = output->width = output->height = -1; |
30 | output->name = strdup(name); | 33 | output->name = strdup(name); |
31 | output->enabled = -1; | 34 | output->enabled = -1; |