From f623075f0f49d60afe570aa943f656ce88c580a0 Mon Sep 17 00:00:00 2001 From: Michael Grant Date: Thu, 26 Dec 2024 17:58:05 +0000 Subject: [PATCH] bugfix for when job has exited, fix crash when converting popup to pane --- popup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/popup.c b/popup.c index fe34f2c0..fc3998e4 100644 --- a/popup.c +++ b/popup.c @@ -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);