summaryrefslogtreecommitdiffstats
path: root/session.c
diff options
context:
space:
mode:
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);