mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-13 01:24:46 -07:00
crash fix
This commit is contained in:
parent
8bd8b6218e
commit
6e567d5b2f
6 changed files with 34 additions and 26 deletions
|
|
@ -170,8 +170,12 @@ bool GameScene::event(QEvent *event)
|
|||
CardItem *card = qgraphicsitem_cast<CardItem *>(itemList[i]);
|
||||
if (!card)
|
||||
continue;
|
||||
if (card->getZone() != zone)
|
||||
if (card->getAttachedTo()) {
|
||||
if (card->getAttachedTo()->getZone() != zone)
|
||||
continue;
|
||||
} else if (card->getZone() != zone)
|
||||
continue;
|
||||
|
||||
if (card->getRealZValue() > maxZ) {
|
||||
maxZ = card->getRealZValue();
|
||||
maxZCard = card;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue