mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-13 11:36:12 -05:00
LocalServer crash fix
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user