mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 08:34:52 -07:00
crash fix
This commit is contained in:
parent
50ae90c148
commit
4186d73c88
2 changed files with 35 additions and 26 deletions
|
|
@ -168,8 +168,10 @@ Player::Player(const QString &_name, int _id, bool _local, CardDatabase *_db, Cl
|
|||
playerMenu->addSeparator();
|
||||
sayMenu = playerMenu->addMenu(QString());
|
||||
initSayMenu();
|
||||
} else
|
||||
} else {
|
||||
countersMenu = 0;
|
||||
sbMenu = 0;
|
||||
}
|
||||
|
||||
retranslateUi();
|
||||
}
|
||||
|
|
@ -602,7 +604,8 @@ void Player::addCounter(int counterId, const QString &name, QColor color, int ra
|
|||
{
|
||||
Counter *c = new Counter(this, counterId, name, color, radius, value, this);
|
||||
counters.insert(counterId, c);
|
||||
countersMenu->addMenu(c->getMenu());
|
||||
if (countersMenu)
|
||||
countersMenu->addMenu(c->getMenu());
|
||||
rearrangeCounters();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue