mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 17:02:15 -07:00
fix nullptr bug
This commit is contained in:
parent
b81cba1784
commit
d81fa57adf
1 changed files with 13 additions and 2 deletions
|
|
@ -3026,12 +3026,23 @@ void Player::cardMenuAction()
|
|||
}
|
||||
}
|
||||
} else {
|
||||
CardZone *zone = cardList[0]->getZone();
|
||||
if (!zone) {
|
||||
return;
|
||||
}
|
||||
|
||||
Player *startPlayer = zone->getPlayer();
|
||||
if (!startPlayer) {
|
||||
return;
|
||||
}
|
||||
|
||||
int startPlayerId = startPlayer->getId();
|
||||
QString startZone = zone->getName();
|
||||
|
||||
ListOfCardsToMove idList;
|
||||
for (const auto &i : cardList) {
|
||||
idList.add_card()->set_card_id(i->getId());
|
||||
}
|
||||
int startPlayerId = cardList[0]->getZone()->getPlayer()->getId();
|
||||
QString startZone = cardList[0]->getZone()->getName();
|
||||
|
||||
switch (static_cast<CardMenuActionType>(a->data().toInt())) {
|
||||
case cmMoveToTopLibrary: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue