summaryrefslogtreecommitdiffstats
path: root/session.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2021-09-17 10:01:10 +0100
committerThomas Adam <thomas@xteddy.org>2021-09-17 10:01:10 +0100
commit25df71b90da9ac9aaedecb623fc7e353eff4d9da (patch)
treea2797b17450f0c9716b8d2be75b09c0d886263d6 /session.c
parent409e121cace098810836e7286a3a55a125424db5 (diff)
parentc4b969ca62a6f0b66f97c9bfe88022a91d162038 (diff)
Merge branch 'obsd-master' into master
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 8665cccc..f30f6a61 100644
--- a/session.c
+++ b/session.c
@@ -203,6 +203,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);