Only loop over clients if table actually found, from Conor Taylor in

GitHub issue 4848.
This commit is contained in:
nicm
2026-02-10 08:28:53 +00:00
parent f016e08153
commit 19b9a34c48

View File

@@ -297,12 +297,12 @@ key_bindings_remove_table(const char *name)
table = key_bindings_get_table(name, 0); table = key_bindings_get_table(name, 0);
if (table != NULL) { if (table != NULL) {
RB_REMOVE(key_tables, &key_tables, table); RB_REMOVE(key_tables, &key_tables, table);
TAILQ_FOREACH(c, &clients, entry) {
if (c->keytable == table)
server_client_set_key_table(c, NULL);
}
key_bindings_unref_table(table); key_bindings_unref_table(table);
} }
TAILQ_FOREACH(c, &clients, entry) {
if (c->keytable == table)
server_client_set_key_table(c, NULL);
}
} }
void void