From 586cafff0f2ce519eff97cda65dba77b2d45f84a Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 30 Mar 2020 07:42:44 +0000 Subject: [PATCH] Do not check flags after the popup struct has been freed. --- popup.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/popup.c b/popup.c index f2b9bd11..7eff7c14 100644 --- a/popup.c +++ b/popup.c @@ -346,9 +346,8 @@ popup_job_complete_cb(struct job *job) pd->status = 0; pd->job = NULL; - if (pd->flags & POPUP_CLOSEEXIT) - server_client_clear_overlay(pd->c); - if ((pd->flags & POPUP_CLOSEEXITZERO) && pd->status == 0) + if ((pd->flags & POPUP_CLOSEEXIT) || + ((pd->flags & POPUP_CLOSEEXITZERO) && pd->status == 0)) server_client_clear_overlay(pd->c); }