Do not check flags after the popup struct has been freed.

This commit is contained in:
nicm 2020-03-30 07:42:44 +00:00
parent 6d0376a679
commit 586cafff0f

View File

@ -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);
}