bugfix for when job has exited, fix crash when converting popup to pane

This commit is contained in:
Michael Grant 2024-12-26 17:58:05 +00:00
parent c311202b73
commit f623075f0f

View File

@ -352,8 +352,9 @@ 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);
if (pd->job)
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);