mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 08:14:47 -07:00
Crash fix
This commit is contained in:
parent
2d2958e931
commit
e94f59d7c2
5 changed files with 11 additions and 8 deletions
|
|
@ -42,8 +42,8 @@ public:
|
|||
inline bool operator()(CardItem *a, CardItem *b) const
|
||||
{
|
||||
if (flags & SortByType) {
|
||||
QString t1 = a->getInfo()->getMainCardType();
|
||||
QString t2 = b->getInfo()->getMainCardType();
|
||||
QString t1 = a->getInfo() ? a->getInfo()->getMainCardType() : QString();
|
||||
QString t2 = b->getInfo() ? b->getInfo()->getMainCardType() : QString();
|
||||
if ((t1 == t2) && (flags & SortByName))
|
||||
return a->getName() < b->getName();
|
||||
return t1 < t2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue