Fix a crash (#3011)

This commit is contained in:
Zach H 2018-01-18 11:53:57 -05:00 committed by GitHub
parent 7a150c558d
commit dcc632e0d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 46 additions and 28 deletions

View file

@ -59,7 +59,7 @@ CardInfoText::CardInfoText(QWidget *parent)
void CardInfoText::setCard(CardInfo *card)
{
if(card)
if (card)
{
nameLabel2->setText(card->getName());
manacostLabel2->setText(card->getManaCost());
@ -68,7 +68,9 @@ void CardInfoText::setCard(CardInfo *card)
powtoughLabel2->setText(card->getPowTough());
loyaltyLabel2->setText(card->getLoyalty() > 0 ? QString::number(card->getLoyalty()) : QString());
textLabel->setText(card->getText());
} else {
}
else
{
nameLabel2->setText("");
manacostLabel2->setText("");
colorLabel2->setText("");