Do not destroy sessions twice, GitHub issue 2889.

pull/2899/head
nicm 2021-09-17 07:20:49 +00:00
parent 3c3d371f99
commit c4b969ca62
1 changed files with 3 additions and 0 deletions

View File

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