1
0
mirror of https://github.com/tmux/tmux.git synced 2025-03-25 07:18:48 +00:00

Do not crash if moving popup that has exited to a pane, from Michael

Grant in GitHub issue 4312.
This commit is contained in:
nicm 2025-01-12 14:36:28 +00:00
parent 37ad1e2f6d
commit 97fe3563fa

View File

@ -353,9 +353,11 @@ popup_make_pane(struct popup_data *pd, enum layout_type type)
new_wp = window_add_pane(wp->window, NULL, hlimit, 0);
layout_assign_pane(lc, new_wp, 0);
new_wp->fd = job_transfer(pd->job, &new_wp->pid, new_wp->tty,
sizeof new_wp->tty);
pd->job = NULL;
if (pd->job != NULL) {
new_wp->fd = job_transfer(pd->job, &new_wp->pid, new_wp->tty,
sizeof new_wp->tty);
pd->job = NULL;
}
screen_set_title(&pd->s, new_wp->base.title);
screen_free(&new_wp->base);