Commit f56c6a18 authored by Dark Raven's avatar Dark Raven Committed by Max Kellermann

ClientList: allow deleting clients in client_list_foreach() callback

parent aa4c506f
......@@ -59,8 +59,8 @@ client_list_add(Client *client)
void
client_list_foreach(void (*callback)(Client *client, void *ctx), void *ctx)
{
for (Client *client : clients)
callback(client, ctx);
for (auto client = clients.begin(); client != clients.end();)
callback(*(client++), ctx);
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment