mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
LocalServer crash fix
This commit is contained in:
parent
5fa2f019d0
commit
461a62e0c8
7 changed files with 28 additions and 0 deletions
|
|
@ -32,8 +32,18 @@ Server::Server(QObject *parent)
|
|||
|
||||
Server::~Server()
|
||||
{
|
||||
}
|
||||
|
||||
void Server::prepareDestroy()
|
||||
{
|
||||
QMutexLocker locker(&serverMutex);
|
||||
|
||||
while (!clients.isEmpty())
|
||||
delete clients.takeFirst();
|
||||
|
||||
QMapIterator<int, Server_Room *> roomIterator(rooms);
|
||||
while (roomIterator.hasNext())
|
||||
delete roomIterator.next().value();
|
||||
}
|
||||
|
||||
AuthenticationResult Server::loginUser(Server_ProtocolHandler *session, QString &name, const QString &password)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue