mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 08:22:15 -07:00
Nullptr check
Took 8 minutes
This commit is contained in:
parent
06d935f512
commit
3d9aa8860b
1 changed files with 6 additions and 1 deletions
|
|
@ -53,10 +53,15 @@ UtilityMenu::UtilityMenu(Player *_player, QMenu *playerMenu) : QMenu(playerMenu)
|
|||
|
||||
void UtilityMenu::populatePredefinedTokensMenu()
|
||||
{
|
||||
DeckLoader *_deck = player->getDeck();
|
||||
clear();
|
||||
setEnabled(false);
|
||||
predefinedTokens.clear();
|
||||
DeckLoader *_deck = player->getDeck();
|
||||
|
||||
if (!_deck) {
|
||||
return;
|
||||
}
|
||||
|
||||
InnerDecklistNode *tokenZone = dynamic_cast<InnerDecklistNode *>(_deck->getRoot()->findChild(DECK_ZONE_TOKENS));
|
||||
|
||||
if (tokenZone) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue