mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-01 02:53:56 -07:00
add extra null check to set active card (#4460)
This commit is contained in:
parent
a10226d096
commit
b0845837c2
1 changed files with 3 additions and 0 deletions
|
|
@ -1420,6 +1420,9 @@ void TabGame::setActiveCard(CardItem *card)
|
||||||
|
|
||||||
void TabGame::updateCardMenu(AbstractCardItem *card)
|
void TabGame::updateCardMenu(AbstractCardItem *card)
|
||||||
{
|
{
|
||||||
|
if (card == nullptr) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Player *player;
|
Player *player;
|
||||||
if ((clients.size() > 1) || !players.contains(localPlayerId)) {
|
if ((clients.size() > 1) || !players.contains(localPlayerId)) {
|
||||||
player = card->getOwner();
|
player = card->getOwner();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue