summaryrefslogtreecommitdiffstats
path: root/session.c
diff options
context:
space:
mode:
authornicm <nicm>2021-09-17 07:20:49 +0000
committernicm <nicm>2021-09-17 07:20:49 +0000
commitc4b969ca62a6f0b66f97c9bfe88022a91d162038 (patch)
tree2ca7cb43f78eba04c18c0b2a7424f027f2349aeb /session.c
parent3c3d371f996b71380547a56db4412c8ca8a31469 (diff)
Do not destroy sessions twice, GitHub issue 2889.
Diffstat (limited to 'session.c')
-rw-r--r--session.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/session.c b/session.c
index 73f44e18..fd567926 100644
--- a/session.c
+++ b/session.c
@@ -205,6 +205,9 @@ session_destroy(struct session *s, int notify, const char *from)
struct winlink *wl;
log_debug("session %s destroyed (%s)", s->name, from);
+
+ if (s->curw == NULL)
+ return;
s->curw = NULL;
RB_REMOVE(sessions, &sessions, s);