Commit f53dadcc authored by Denis Krjuchkov's avatar Denis Krjuchkov

ClientList.cxx: copy client list before iterating

It seems that it is not safe to remove the item from std::list while it's being iterated somewhere else. This is a very simple quick fix to make things work until some better solution is implemented.
parent 90ab65f8
......@@ -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);
}
......
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