aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicm <nicm>2020-03-30 07:42:44 +0000
committernicm <nicm>2020-03-30 07:42:44 +0000
commit586cafff0f2ce519eff97cda65dba77b2d45f84a (patch)
treea7c7d57bf6670f54513b8469c98ba7c98cd0581f
parent6d0376a679f87fe0fdecd1086bf89bfa0653d416 (diff)
downloadrtmux-586cafff0f2ce519eff97cda65dba77b2d45f84a.tar.gz
rtmux-586cafff0f2ce519eff97cda65dba77b2d45f84a.tar.bz2
rtmux-586cafff0f2ce519eff97cda65dba77b2d45f84a.zip
Do not check flags after the popup struct has been freed.
-rw-r--r--popup.c5
1 files 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);
}