ClientList: allow deleting clients in client_list_foreach() callback
This commit is contained in:
parent
aa4c506fcd
commit
f56c6a18c1
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue