mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Crash fix
This commit is contained in:
parent
2d2958e931
commit
e94f59d7c2
5 changed files with 11 additions and 8 deletions
|
|
@ -176,13 +176,13 @@ void DeckViewCardContainer::paint(QPainter *painter, const QStyleOptionGraphicsI
|
|||
void DeckViewCardContainer::addCard(DeckViewCard *card)
|
||||
{
|
||||
cards.append(card);
|
||||
cardsByType.insert(card->getInfo()->getMainCardType(), card);
|
||||
cardsByType.insert(card->getInfo() ? card->getInfo()->getMainCardType() : "", card);
|
||||
}
|
||||
|
||||
void DeckViewCardContainer::removeCard(DeckViewCard *card)
|
||||
{
|
||||
cards.removeAt(cards.indexOf(card));
|
||||
cardsByType.remove(card->getInfo()->getMainCardType(), card);
|
||||
cardsByType.remove(card->getInfo() ? card->getInfo()->getMainCardType(): "", card);
|
||||
}
|
||||
|
||||
QList<QPair<int, int> > DeckViewCardContainer::getRowsAndCols() const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue