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