mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
clear all players when closing game tab (#6828)
this prevents issues caused by items in play when using the player destructor in the wrong order
This commit is contained in:
parent
6ab947418c
commit
501c4b96d4
1 changed files with 3 additions and 0 deletions
|
|
@ -259,6 +259,9 @@ TabGame::~TabGame()
|
|||
if (replayManager) {
|
||||
delete replayManager->replay;
|
||||
}
|
||||
for (auto &player : game->getPlayerManager()->getPlayers()) {
|
||||
player->clear();
|
||||
}
|
||||
}
|
||||
|
||||
void TabGame::updatePlayerListDockTitle()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue