mirror of
https://github.com/tmux/tmux.git
synced 2024-11-18 10:28:54 +00:00
Do not crash with run-shell -b and no window pane available, reported by
Sergei Dyshel.
This commit is contained in:
parent
f947d25c9d
commit
36f8fa316d
@ -62,7 +62,7 @@ cmd_run_shell_print(struct job *job, const char *msg)
|
||||
|
||||
if (cdata->wp_id != -1)
|
||||
wp = window_pane_find_by_id(cdata->wp_id);
|
||||
if (wp == NULL) {
|
||||
if (cdata->item != NULL && wp == NULL) {
|
||||
cmdq_print(cdata->item, "%s", msg);
|
||||
return;
|
||||
}
|
||||
@ -100,11 +100,6 @@ cmd_run_shell_exec(struct cmd *self, struct cmdq_item *item)
|
||||
cdata = xcalloc(1, sizeof *cdata);
|
||||
cdata->cmd = shellcmd;
|
||||
|
||||
if (args_has(args, 't') && wp != NULL)
|
||||
cdata->wp_id = wp->id;
|
||||
else
|
||||
cdata->wp_id = -1;
|
||||
|
||||
if (args_has(args, 't') && wp != NULL)
|
||||
cdata->wp_id = wp->id;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user