Do not discard control state before a control client creates it, GitHub

issue 5740 from Andre Popp.
This commit is contained in:
nicm
2026-10-15 07:48:05 +00:00
committed by tmux update bot
parent 610bf01351
commit c67b537146

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: server-client.c,v 1.520 2026/10/12 10:48:05 nicm Exp $ */ /* $OpenBSD: server-client.c,v 1.521 2026/10/15 07:48:05 nicm Exp $ */
/* /*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com> * Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -2279,7 +2279,7 @@ server_client_check_exit(struct client *c, int force)
if (~c->flags & CLIENT_EXIT) if (~c->flags & CLIENT_EXIT)
return; return;
if (c->flags & CLIENT_CONTROL) { if ((c->flags & CLIENT_CONTROL) && c->control_state != NULL) {
if (force) if (force)
control_discard_all(c); control_discard_all(c);
else { else {