aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ClientList.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ClientList.cxx b/src/ClientList.cxx
index b45be34c3..403da3a18 100644
--- a/src/ClientList.cxx
+++ b/src/ClientList.cxx
@@ -59,7 +59,8 @@ client_list_add(Client *client)
void
client_list_foreach(void (*callback)(Client *client, void *ctx), void *ctx)
{
- for (Client *client : clients)
+ auto clients_local = std::list<Client *>(clients);
+ for (Client *client : clients_local)
callback(client, ctx);
}