diff --git a/common/server_game.cpp b/common/server_game.cpp index 3fe21f99..97a76e8e 100644 --- a/common/server_game.cpp +++ b/common/server_game.cpp @@ -578,6 +578,10 @@ void Server_Game::unattachCards(GameEventStorage &ges, Server_Player *player) QMapIterator zoneIterator(player->getZones()); for (Server_CardZone *zone : player->getZones()) { for (Server_Card *card : zone->getCards()) { + if (card == nullptr) { + continue; + } + // Make a copy of the list because the original one gets modified during the loop QList attachedCards = card->getAttachedCards(); for (Server_Card *attachedCard : attachedCards) {