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
|
|
@ -8,6 +8,19 @@ Server_Room::Server_Room(int _id, const QString &_name, const QString &_descript
|
|||
{
|
||||
}
|
||||
|
||||
Server_Room::~Server_Room()
|
||||
{
|
||||
QMutexLocker locker(&roomMutex);
|
||||
qDebug("Server_Room destructor");
|
||||
|
||||
const QList<Server_Game *> gameList = games.values();
|
||||
for (int i = 0; i < gameList.size(); ++i)
|
||||
delete gameList[i];
|
||||
games.clear();
|
||||
|
||||
clear();
|
||||
}
|
||||
|
||||
Server *Server_Room::getServer() const
|
||||
{
|
||||
return static_cast<Server *>(parent());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue