Allow input to be NULL.

This commit is contained in:
Nicholas Marriott
2026-06-30 15:42:25 +01:00
parent eb2e26f4cd
commit 8908f50524
3 changed files with 7 additions and 7 deletions

View File

@@ -373,8 +373,12 @@ cmd_invoke_get(struct cmd_parse_tree *tree, struct cmdq_state *state,
struct cmd_invoke_state *is;
struct cmd_parse_node *root = cmd_parse_root(tree), *first;
struct cmdq_item *item;
struct cmd_invoke_input new_input = { 0 };
int i;
if (input == NULL)
input = &new_input;
is = xcalloc(1, sizeof *is);
is->references = 1;
is->tree = cmd_parse_add_ref(tree);