mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 08:34:52 -07:00
Fix segfault when game is closed while card view window is open (#5507)
This commit is contained in:
parent
b004e91aa4
commit
aeb1b9fb4f
9 changed files with 26 additions and 40 deletions
|
|
@ -189,14 +189,7 @@ void TabGame::emitUserEvent()
|
|||
|
||||
TabGame::~TabGame()
|
||||
{
|
||||
scene->clearViews();
|
||||
|
||||
delete replay;
|
||||
|
||||
QMapIterator<int, Player *> i(players);
|
||||
while (i.hasNext()) {
|
||||
delete i.next().value();
|
||||
}
|
||||
}
|
||||
|
||||
void TabGame::updatePlayerListDockTitle()
|
||||
|
|
@ -1097,6 +1090,7 @@ void TabGame::eventLeave(const Event_Leave &event, int eventPlayerId, const Game
|
|||
players.remove(eventPlayerId);
|
||||
emit playerRemoved(player);
|
||||
player->clear();
|
||||
scene->removePlayer(player);
|
||||
player->deleteLater();
|
||||
|
||||
// Rearrange all remaining zones so that attachment relationship updates take place
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue