crash fix

This commit is contained in:
Max-Wilhelm Bruker 2010-12-01 14:56:50 +01:00
parent 8bd8b6218e
commit 6e567d5b2f
6 changed files with 34 additions and 26 deletions

View file

@ -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;