mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-15 11:38:49 -07:00
[TabGame] Fix dangling PlayerMenus in gameMenu (#6215)
* Player manager is responsible for deleting players. Took 21 minutes * Clean up dangling QAction* wrappers for PlayerMenus in TabGame::processPlayerLeave(Player* leavingPlayer) Took 37 seconds * Lint. Took 11 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
30e6b52783
commit
cff16346ef
2 changed files with 26 additions and 8 deletions
|
|
@ -60,6 +60,7 @@ void PlayerManager::removePlayer(int playerId)
|
|||
emit playerRemoved(player);
|
||||
emit playerCountChanged();
|
||||
players.remove(playerId);
|
||||
player->deleteLater();
|
||||
}
|
||||
|
||||
Player *PlayerManager::getPlayer(int playerId) const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue