mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-21 23:00:24 -08:00
server mutex fix
This commit is contained in:
@@ -16,17 +16,25 @@ Server_Player::Server_Player(Server_Game *_game, int _playerId, ServerInfo_User
|
||||
}
|
||||
|
||||
Server_Player::~Server_Player()
|
||||
{
|
||||
}
|
||||
|
||||
void Server_Player::prepareDestroy()
|
||||
{
|
||||
QMutexLocker locker(&game->gameMutex);
|
||||
QMutexLocker locker2(&playerMutex);
|
||||
|
||||
delete deck;
|
||||
|
||||
playerMutex.lock();
|
||||
if (handler)
|
||||
handler->playerRemovedFromGame(game);
|
||||
playerMutex.unlock();
|
||||
|
||||
delete userInfo;
|
||||
|
||||
clearZones();
|
||||
|
||||
deleteLater();
|
||||
}
|
||||
|
||||
void Server_Player::moveToThread(QThread *thread)
|
||||
|
||||
Reference in New Issue
Block a user