mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
sanity checks; server crash fix
This commit is contained in:
parent
a8e9501dad
commit
0603b3dafd
3 changed files with 9 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue