=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-if-shell.c,v retrieving revision 1.61 retrieving revision 1.62 diff -u -r1.61 -r1.62 --- src/usr.bin/tmux/cmd-if-shell.c 2019/05/23 11:13:30 1.61 +++ src/usr.bin/tmux/cmd-if-shell.c 2019/05/25 07:15:53 1.62 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-if-shell.c,v 1.61 2019/05/23 11:13:30 nicm Exp $ */ +/* $OpenBSD: cmd-if-shell.c,v 1.62 2019/05/25 07:15:53 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha @@ -159,7 +159,7 @@ struct cmd_if_shell_data *cdata = job_get_data(job); struct client *c = cdata->client; struct mouse_event *m = &cdata->mouse; - struct cmdq_item *new_item; + struct cmdq_item *new_item = NULL; char *cmd; int status; struct cmd_parse_result *pr; @@ -175,10 +175,10 @@ pr = cmd_parse_from_string(cmd, &cdata->input); switch (pr->status) { case CMD_PARSE_EMPTY: - new_item = NULL; break; case CMD_PARSE_ERROR: - new_item = cmdq_get_error(pr->error); + if (cdata->item != NULL) + cmdq_error(cdata->item, "%s", pr->error); free(pr->error); break; case CMD_PARSE_SUCCESS: