sanity checks; server crash fix

This commit is contained in:
Max-Wilhelm Bruker 2009-12-08 00:46:38 +01:00
parent a8e9501dad
commit 0603b3dafd
3 changed files with 9 additions and 2 deletions

View file

@ -563,6 +563,10 @@ void Player::eventSetCardAttr(Event_SetCardAttr *event)
emit logSetTapped(this, QString("-1"), event->getAttrValue() == "1");
} else {
CardItem *card = zone->getCard(event->getCardId(), QString());
if (!card) {
qDebug() << "Player::eventSetCardAttr: card id=" << event->getCardId() << "not found";
return;
}
setCardAttrHelper(card, event->getAttrName(), event->getAttrValue(), false);
}
}